Added array support for pointer-permissions (#5921)
* added array support for pointer permissions * added tests for array support for pointer permissions * Postgres fix * simplify PG, no idea why this works
This commit is contained in:
committed by
Diamond Lewis
parent
4f8da12674
commit
0fa315fc5b
@@ -238,9 +238,12 @@ function validateCLP(perms: ClassLevelPermissions, fields: SchemaFields) {
|
||||
} else {
|
||||
perms[operation].forEach(key => {
|
||||
if (
|
||||
!fields[key] ||
|
||||
fields[key].type != 'Pointer' ||
|
||||
fields[key].targetClass != '_User'
|
||||
!(
|
||||
fields[key] &&
|
||||
((fields[key].type == 'Pointer' &&
|
||||
fields[key].targetClass == '_User') ||
|
||||
fields[key].type == 'Array')
|
||||
)
|
||||
) {
|
||||
throw new Parse.Error(
|
||||
Parse.Error.INVALID_JSON,
|
||||
|
||||
Reference in New Issue
Block a user