aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-06-21 15:00:06 -0400
committerbobzel <zzzman@gmail.com>2021-06-21 15:00:06 -0400
commit3dcf29b8c96eb93eda5c0d75475a36821036130e (patch)
tree0069cd0c9a88d5f0268d6717ffbb078ebf4be7d5 /src
parente7606b50b2e40574a625e233bd808d1f0ad41555 (diff)
allow playground fields to be updated by clients that have edit permissions
Diffstat (limited to 'src')
-rw-r--r--src/fields/Doc.ts4
1 files changed, 3 insertions, 1 deletions
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 {