From 3dcf29b8c96eb93eda5c0d75475a36821036130e Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 21 Jun 2021 15:00:06 -0400 Subject: allow playground fields to be updated by clients that have edit permissions --- src/fields/Doc.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index de4c1e5f9..c9a5ee1bc 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -251,7 +251,9 @@ export class Doc extends RefField { DocServer.GetRefField(this[Id], true); } }; - if (sameAuthor || fKey.startsWith("acl") || DocServer.getFieldWriteMode(fKey) !== DocServer.WriteMode.Playground) { + const effectiveAcl = GetEffectiveAcl(fKey); + const writeMode = DocServer.getFieldWriteMode(fKey as string); + if (sameAuthor || effectiveAcl === AclEdit || effectiveAcl === AclAdmin || fKey.startsWith("acl") || writeMode !== DocServer.WriteMode.Playground) { delete this[CachedUpdates][fKey]; await fn(); } else { -- cgit v1.2.3-70-g09d2