Merge pull request from GHSA-2479-qvv7-47qq

* Failing test

* provide fix

* clearer test

* failing expect
This commit is contained in:
Diamond Lewis
2019-06-12 16:12:11 -05:00
committed by GitHub
parent 54ba9a0f00
commit 8709daf698
2 changed files with 29 additions and 3 deletions

View File

@@ -228,9 +228,7 @@ function validateCLP(perms: ClassLevelPermissions, fields: SchemaFields) {
// @flow-disable-next
throw new Parse.Error(
Parse.Error.INVALID_JSON,
`'${
perms[operation]
}' is not a valid value for class level permissions ${operation}`
`'${perms[operation]}' is not a valid value for class level permissions ${operation}`
);
} else {
perms[operation].forEach(key => {
@@ -395,6 +393,9 @@ class SchemaData {
this.__data = {};
this.__protectedFields = protectedFields;
allSchemas.forEach(schema => {
if (volatileClasses.includes(schema.className)) {
return;
}
Object.defineProperty(this, schema.className, {
get: () => {
if (!this.__data[schema.className]) {