Makes sure we don't duplicate user ACL's keys (#2651)
* Adds repro for issue #2246 * Provide fix for issue #2246 * Nit with Set to deduplicate the acl array * remove debuging console.log
This commit is contained in:
@@ -859,6 +859,7 @@ DatabaseController.prototype.addPointerPermissions = function(schema, className,
|
||||
// the ACL should have exactly 1 user
|
||||
if (perms && perms[field] && perms[field].length > 0) {
|
||||
// No user set return undefined
|
||||
// If the length is > 1, that means we didn't dedup users correctly
|
||||
if (userACL.length != 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user