diff options
author | bobzel <zzzman@gmail.com> | 2021-09-27 14:40:30 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-27 14:40:30 -0400 |
commit | 6547bbc949b8333fc1dd86e11ecda5d98ae4a8d9 (patch) | |
tree | 317594efd0ddba018eb3f345bbf81dd8e32d85aa /src/fields/util.ts | |
parent | b3c6f5c4abb93c6178bb3d90aa68fad86e690097 (diff) | |
parent | eb529611c97c9936577697b829c50b4ca0736c6e (diff) |
Merge branch 'master' into temporalmedia-mehek
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r-- | src/fields/util.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts index 439c4d333..3590c2dea 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -191,7 +191,8 @@ let HierarchyMapping: Map<symbol, number> | undefined; function getEffectiveAcl(target: any, user?: string): symbol { const targetAcls = target[AclSym]; const userChecked = user || Doc.CurrentUserEmail; // if the current user is the author of the document / the current user is a member of the admin group - if (userChecked === (target.__fields?.author || target.author)) return AclAdmin; // target may be a Doc of Proxy, so check __fields.author and .author + const targetAuthor = (target.__fields?.author || target.author); // target may be a Doc of Proxy, so check __fields.author and .author + if (userChecked === targetAuthor || !targetAuthor) return AclAdmin; if (SnappingManager.GetCachedGroupByName("Admin")) return AclAdmin; if (targetAcls && Object.keys(targetAcls).length) { |