From 93670ebde5de9c602aa45d0e06f377e8d3f89ce8 Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Mon, 21 Sep 2020 21:21:03 +0530 Subject: minor changes --- src/fields/util.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/fields') diff --git a/src/fields/util.ts b/src/fields/util.ts index 9e5890aa8..31d5cc5f2 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -165,11 +165,10 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number, // if the current user is the author of the document / the current user is a member of the admin group const userChecked = user || Doc.CurrentUserEmail; if (userChecked === (target.__fields?.author || target.author)) return AclAdmin; + if (currentUserGroups.includes("Admin")) return AclAdmin; if (target[AclSym] && Object.keys(target[AclSym]).length) { - if (currentUserGroups.includes("Admin")) return AclAdmin; - // if the acl is being overriden or the property being modified is one of the playground fields (which can be freely modified) if (_overrideAcl || (in_prop && DocServer.PlaygroundFields?.includes(in_prop.toString()))) return AclEdit; -- cgit v1.2.3-70-g09d2 From 3c24520a4bd34c50569605ad199f82e544810d11 Mon Sep 17 00:00:00 2001 From: usodhi <61431818+usodhi@users.noreply.github.com> Date: Tue, 22 Sep 2020 18:07:25 +0530 Subject: changed default sharing permission in sharing menu to readonly --- src/client/util/SharingManager.tsx | 2 +- src/fields/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fields') diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index d3500970d..713a27581 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -88,7 +88,7 @@ export class SharingManager extends React.Component<{}> { this.targetDoc = target_doc || target?.props.Document; DictationOverlay.Instance.hasActiveModal = true; this.isOpen = this.targetDoc !== undefined; - this.permissions = SharingPermissions.Edit; + this.permissions = SharingPermissions.View; }); } diff --git a/src/fields/util.ts b/src/fields/util.ts index a3849661d..fe3eea69d 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -234,7 +234,7 @@ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc // maps over the aliases of the document const links = DocListCast(dataDoc.links); - links.forEach(alias => distributeAcls(key, acl, alias, inheritingFromCollection, visited)); + links.forEach(link => distributeAcls(key, acl, link, inheritingFromCollection, visited)); // maps over the children of the document DocListCast(dataDoc[Doc.LayoutFieldKey(dataDoc)]).map(d => { -- cgit v1.2.3-70-g09d2