Makes sure _acl is set as empty {} (#2495)

* regression test for #2465

* Makes sure _acl is set when locked down

- Fixes #2465
This commit is contained in:
Florent Vilmart
2016-08-12 16:15:55 -04:00
committed by Drew
parent e690b73bb5
commit 2f1ee2186b
2 changed files with 34 additions and 3 deletions

View File

@@ -341,6 +341,7 @@ const addLegacyACL = restObject => {
restObject._wperm.forEach(entry => {
_acl[entry] = { w: true };
});
restObjectCopy._acl = _acl;
}
if (restObject._rperm) {
@@ -351,9 +352,6 @@ const addLegacyACL = restObject => {
_acl[entry].r = true;
}
});
}
if (Object.keys(_acl).length > 0) {
restObjectCopy._acl = _acl;
}