aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-22 09:09:01 -0400
committerGitHub <noreply@github.com>2020-09-22 09:09:01 -0400
commit3555ad2de2d60079e013bc900573228044205847 (patch)
tree7d5e7ea75d80f62bd154682ffb7a9f9479b91721 /src/fields/util.ts
parent02029b5cad1c27e65630a63cd4d2b632ed6973cd (diff)
parent3c24520a4bd34c50569605ad199f82e544810d11 (diff)
Merge pull request #783 from browngraphicslab/acls_uv
Minor changes
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index 2ff966e7e..fe3eea69d 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -165,11 +165,10 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number,
// if the current user is the author of the document / the current user is a member of the admin group
const userChecked = user || Doc.CurrentUserEmail;
if (userChecked === (target.__fields?.author || target.author)) return AclAdmin;
+ if (currentUserGroups.includes("Admin")) return AclAdmin;
if (target[AclSym] && Object.keys(target[AclSym]).length) {
- if (currentUserGroups.includes("Admin")) return AclAdmin;
-
// if the acl is being overriden or the property being modified is one of the playground fields (which can be freely modified)
if (_overrideAcl || (in_prop && DocServer.PlaygroundFields?.includes(in_prop.toString()))) return AclEdit;
@@ -235,7 +234,7 @@ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc
// maps over the aliases of the document
const links = DocListCast(dataDoc.links);
- links.forEach(alias => distributeAcls(key, acl, alias, inheritingFromCollection, visited));
+ links.forEach(link => distributeAcls(key, acl, link, inheritingFromCollection, visited));
// maps over the children of the document
DocListCast(dataDoc[Doc.LayoutFieldKey(dataDoc)]).map(d => {