Skip to content

Commit

Permalink
Merge pull request #63 from Code-4-Community/SD.addSuperAdmins
Browse files Browse the repository at this point in the history
Add Super Admin Privilege Level
  • Loading branch information
SofieDunt authored Apr 30, 2021
2 parents a1d32a4 + db4dcfd commit 5d54d6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ const App: React.FC = () => {
</Switch>
);

case PrivilegeLevel.SUPER_ADMIN:
case PrivilegeLevel.ADMIN:
return (
<Switch>
Expand Down
1 change: 1 addition & 0 deletions src/auth/ducks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export enum PrivilegeLevel {
NONE = 'none',
STANDARD = 'standard',
ADMIN = 'admin',
SUPER_ADMIN = 'superAdmin',
}

export const NO_USER_ID = -1;
Expand Down
3 changes: 2 additions & 1 deletion src/components/navBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ const NavBar: React.FC<NavBarProps> = ({ tokens, userData }) => {
>
Account Settings
</Menu.Item>
{privilegeLevel === PrivilegeLevel.ADMIN && (
{(privilegeLevel === PrivilegeLevel.ADMIN ||
privilegeLevel === PrivilegeLevel.SUPER_ADMIN) && (
<Menu.Item
onClick={() => {
history.push(Routes.ADMIN);
Expand Down

0 comments on commit 5d54d6e

Please sign in to comment.