aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-07 14:20:57 -0400
committerbobzel <zzzman@gmail.com>2023-07-07 14:20:57 -0400
commit0f0d646e45de42c7f84f6fa316c80d1413f92e5c (patch)
tree4322fc75f8621c793d623be4836f3d77894156e3 /src/fields/util.ts
parentfa38dbe06d6ddb5f4499b759459a24d2b3c111e8 (diff)
parentaaaea6344e74b2d4585dccbc0ca3f0249d6dacd6 (diff)
added a dashboard count to dashboard view to indicate that shared dashboards exist. made dashboard lists scrollable. made guest mode be livePlayground to
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index 9230d9df0..0e9940ced 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -65,7 +65,7 @@ const _setterImpl = action(function (target: any, prop: string | symbol | number
const sameAuthor = fromServer || receiver.author === Doc.CurrentUserEmail;
const writeToDoc =
sameAuthor || effectiveAcl === AclEdit || effectiveAcl === AclAdmin || writeMode === DocServer.WriteMode.Playground || writeMode === DocServer.WriteMode.LivePlayground || (effectiveAcl === AclAugment && value instanceof RichTextField);
- const writeToServer = (sameAuthor || effectiveAcl === AclEdit || effectiveAcl === AclAdmin || (effectiveAcl === AclAugment && value instanceof RichTextField)) && !DocServer.Control.isReadOnly();
+ const writeToServer = (sameAuthor || effectiveAcl === AclEdit || effectiveAcl === AclAdmin || (effectiveAcl === AclAugment && Doc.CurrentUserEmail !== 'guest' && value instanceof RichTextField)) && !DocServer.Control.isReadOnly();
if (writeToDoc) {
if (value === undefined) {
@@ -268,13 +268,13 @@ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc
// maps over the children of the document
DocListCast(dataDoc[Doc.LayoutFieldKey(dataDoc)]).forEach(d => {
distributeAcls(key, acl, d, inheritingFromCollection, visited);
- distributeAcls(key, acl, d[DocData], inheritingFromCollection, visited);
+ d !== d[DocData] && distributeAcls(key, acl, d[DocData], inheritingFromCollection, visited);
});
// maps over the annotations of the document
DocListCast(dataDoc[Doc.LayoutFieldKey(dataDoc) + '_annotations']).forEach(d => {
distributeAcls(key, acl, d, inheritingFromCollection, visited);
- distributeAcls(key, acl, d[DocData], inheritingFromCollection, visited);
+ d !== d[DocData] && distributeAcls(key, acl, d[DocData], inheritingFromCollection, visited);
});
}