diff options
author | bobzel <zzzman@gmail.com> | 2021-09-27 09:49:26 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-27 09:49:26 -0400 |
commit | f70aa7ba42153b2c283b7b9af04a5e75ea19a7ad (patch) | |
tree | dee6cf3e22fb65ffa310f495ff1cafd5aed920d0 /src/fields/util.ts | |
parent | 67703bcbc6dbc01e360d07de19648a9faab4899b (diff) |
made docs with no author Admin for everyone. fixed run-time warnings: not memoized accesses when panning, NaNs drawing some labelBoxes, filter box filter boolean options,
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) { |