Skip to content

Commit

Permalink
Limit UI view for the "user" role (#259)
Browse files Browse the repository at this point in the history
  • Loading branch information
braginini authored Aug 15, 2023
1 parent dedbe55 commit 14d9b80
Show file tree
Hide file tree
Showing 5 changed files with 296 additions and 212 deletions.
1 change: 1 addition & 0 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const Navbar = () => {
"/acls",
"/routes",
"/dns",
"/users",
"/activity",
"/settings",
];
Expand Down
5 changes: 3 additions & 2 deletions src/components/UserEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ const UserEdit = (props: any) => {
dispatch(userActions.setUser(null as unknown as User));
dispatch(personalAccessTokenActions.resetPersonalAccessTokens(null));
dispatch(userActions.setUserTabOpen(key));
dispatch(userActions.setEditUserPopupVisible(false));
};

const selectValidator = (_: RuleObject, value: string[]) => {
Expand Down Expand Up @@ -331,7 +332,7 @@ const UserEdit = (props: any) => {
// menu: { items: menuItems },
},
{
title: user.name,
title: user?.name,
},
]}
/>
Expand Down Expand Up @@ -386,7 +387,7 @@ const UserEdit = (props: any) => {
style={{ marginRight: "70px", fontWeight: "500" }}
>
<Input
disabled={user.id}
disabled={user?.id}
value={formUser.email}
style={{ color: "#8c8c8c" }}
autoComplete="off"
Expand Down
4 changes: 4 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -515,4 +515,8 @@ ul.ant-list-items {

.d-none{
display: none!important;
}
.nohover {
background: transparent!important;
cursor: text;
}
Loading

0 comments on commit 14d9b80

Please sign in to comment.