diff options
author | bobzel <zzzman@gmail.com> | 2020-09-24 09:47:45 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-24 09:47:45 -0400 |
commit | 9aaf620dd57b144c36ac9d5cd3c32b3c6ecf33db (patch) | |
tree | 3a797c1b4889669d589758576c38de7df7de87a6 /src | |
parent | a6030259ccfc04b977bf3b9eca5dca0af1c8131f (diff) |
fixed acls for ink
Diffstat (limited to 'src')
-rw-r--r-- | src/client/documents/Documents.ts | 2 | ||||
-rw-r--r-- | src/fields/util.ts | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 0e134b6d0..2de1090a2 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -748,6 +748,8 @@ export namespace Docs { I.author = Doc.CurrentUserEmail; I.rotation = 0; I.data = new InkField(points); + I["acl-Public"] = Doc.UserDoc()?.defaultAclPrivate ? SharingPermissions.None : SharingPermissions.Add; + I["acl-Override"] = "unset"; return I; } diff --git a/src/fields/util.ts b/src/fields/util.ts index 48b14ea57..fa1c47055 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -175,7 +175,8 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number, // 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 (target[AclSym]["acl-Override"] !== AclUnset) return target[AclSym]["acl-Override"]; + const override = target[AclSym]["acl-Override"]; + if (override !== AclUnset && override !== undefined) return target[AclSym]["acl-Override"]; let effectiveAcl = AclPrivate; const HierarchyMapping = new Map<symbol, number>([ |