diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 20:51:56 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 20:51:56 +0530 |
commit | 22889f0c39e4ffe2659b84befdc5028ade034b6f (patch) | |
tree | adddf9d86dd6a8cbddcac2a8f4800d9edbb3086e | |
parent | 94a6e1dd09a0460c96eb4670e1d2efbd71a43873 (diff) |
admin case
-rw-r--r-- | src/client/util/GroupManager.tsx | 4 | ||||
-rw-r--r-- | src/fields/util.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/util/GroupManager.tsx b/src/client/util/GroupManager.tsx index af7ad1cdf..0765d89e4 100644 --- a/src/client/util/GroupManager.tsx +++ b/src/client/util/GroupManager.tsx @@ -159,7 +159,7 @@ export class GroupManager extends React.Component<{}> { * @returns the members of the admin group. */ get adminGroupMembers(): string[] { - return this.getGroup("admin") ? JSON.parse(StrCast(this.getGroup("admin")!.members)) : ""; + return this.getGroup("Admin") ? JSON.parse(StrCast(this.getGroup("Admin")!.members)) : ""; } /** @@ -179,7 +179,7 @@ export class GroupManager extends React.Component<{}> { */ createGroupDoc(groupName: string, memberEmails: string[] = []) { const groupDoc = new Doc; - groupDoc.groupName = groupName; + groupDoc.groupName = groupName.toLowerCase() === "admin" ? "Admin" : groupName; groupDoc.owners = JSON.stringify([Doc.CurrentUserEmail]); groupDoc.members = JSON.stringify(memberEmails); if (memberEmails.includes(Doc.CurrentUserEmail)) { diff --git a/src/fields/util.ts b/src/fields/util.ts index 069f01195..d0c722ddc 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -166,7 +166,7 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number, if (target[AclSym] && Object.keys(target[AclSym]).length) { - if (currentUserGroups.includes("admin")) return AclAdmin; + 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; |