From bc45c96768a24a5c9b9735d610d407e856b05744 Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Fri, 25 Sep 2020 01:29:05 +0530 Subject: override related changes. more to go --- src/fields/util.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/fields') diff --git a/src/fields/util.ts b/src/fields/util.ts index c055be132..20ba1ca39 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -189,13 +189,12 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number, if (currentUserGroups.includes(entity) || userChecked === entity) { if (HierarchyMapping.get(value as symbol)! > HierarchyMapping.get(effectiveAcl)!) { effectiveAcl = value as symbol; - if (effectiveAcl === AclAdmin) break; + if (effectiveAcl === AclAdmin) return effectiveAcl; } } } - // if there's an overriding acl set through the properties panel or sharing menu, that's what's returned. - // if it's unset, it just goes ahead + // if there's an overriding acl set through the properties panel or sharing menu, that's what's returned if the user isn't an admin of the document const override = target[AclSym]["acl-Override"]; if (override !== AclUnset && override !== undefined) effectiveAcl = target[AclSym]["acl-Override"]; -- cgit v1.2.3-70-g09d2