diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-09-21 04:34:22 +0800 |
---|---|---|
committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-09-21 04:34:22 +0800 |
commit | 0d28500e1155355f5efa8d602b862e6156282068 (patch) | |
tree | c1b6efe684e4cdfe10a5c333874a74663d15d226 /src/fields/Doc.ts | |
parent | 5e488f1d8ae46bc6001b898eade8c8f7ae21129e (diff) | |
parent | b9735a34252459ee7f09bb58a49cc3da7a652ab7 (diff) |
Merge branch 'presentation_v1' of https://github.com/browngraphicslab/Dash-Web into presentation_v1
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index a8950f1ee..ba7c9c7da 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -121,7 +121,7 @@ const AclMap = new Map<string, symbol>([ export function fetchProto(doc: Doc) { const permissions: { [key: string]: symbol } = {}; - Object.keys(doc).filter(key => key.startsWith("ACL")).forEach(key => permissions[key] = AclMap.get(StrCast(doc[key]))!); + Object.keys(doc).filter(key => key.startsWith("acl")).forEach(key => permissions[key] = AclMap.get(StrCast(doc[key]))!); if (Object.keys(permissions).length) doc[AclSym] = permissions; @@ -253,7 +253,7 @@ export class Doc extends RefField { const prev = GetEffectiveAcl(this); this[UpdatingFromServer] = true; this[fKey] = value; - if (fKey.startsWith("ACL")) { + if (fKey.startsWith("acl")) { fetchProto(this); } this[UpdatingFromServer] = false; @@ -261,7 +261,7 @@ export class Doc extends RefField { DocServer.GetRefField(this[Id], true); } }; - if (sameAuthor || fKey.startsWith("ACL") || DocServer.getFieldWriteMode(fKey) !== DocServer.WriteMode.Playground) { + if (sameAuthor || fKey.startsWith("acl") || DocServer.getFieldWriteMode(fKey) !== DocServer.WriteMode.Playground) { delete this[CachedUpdates][fKey]; await fn(); } else { @@ -775,7 +775,7 @@ export namespace Doc { } }); copy.author = Doc.CurrentUserEmail; - Doc.UserDoc().defaultAclPrivate && (copy["ACL-Public"] = "Not Shared"); + Doc.UserDoc().defaultAclPrivate && (copy["acl-Public"] = "Not Shared"); return copy; } @@ -803,7 +803,7 @@ export namespace Doc { const applied = ApplyTemplateTo(templateDoc, target, targetKey, templateDoc.title + "(..." + _applyCount++ + ")"); target.layoutKey = targetKey; applied && (Doc.GetProto(applied).type = templateDoc.type); - Doc.UserDoc().defaultAclPrivate && (applied["ACL-Public"] = "Not Shared"); + Doc.UserDoc().defaultAclPrivate && (applied["acl-Public"] = "Not Shared"); return applied; } return undefined; |