diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 21:20:24 +0530 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-30 21:20:24 +0530 |
commit | 0bdcfdb9b8e0fdfe48b58f1d2645325011d668d5 (patch) | |
tree | bedf89c4a0e617ad934c630a9a09d782190d4400 /src/client/util/GroupManager.tsx | |
parent | 22889f0c39e4ffe2659b84befdc5028ade034b6f (diff) |
admin alert
Diffstat (limited to 'src/client/util/GroupManager.tsx')
-rw-r--r-- | src/client/util/GroupManager.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/GroupManager.tsx b/src/client/util/GroupManager.tsx index 0765d89e4..cb15b5081 100644 --- a/src/client/util/GroupManager.tsx +++ b/src/client/util/GroupManager.tsx @@ -282,7 +282,11 @@ export class GroupManager extends React.Component<{}> { alert("Please enter a group name"); return; } - if (this.getAllGroups().find(group => group.groupName === this.inputRef.current!.value)) { // why do I need a null check here? + if (this.inputRef.current.value.toLowerCase() === "admin" && this.getGroup("Admin")) { + alert("You cannot override the Admin group"); + return; + } + if (this.getGroup(this.inputRef.current.value)) { alert("Please select a unique group name"); return; } |