Skip to content

Commit

Permalink
fix(admin-ui): permission check for user
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Nov 14, 2022
1 parent 2040e9a commit 9794f29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions admin-ui/app/utils/PermChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const STAT_JANS_READ = BASE_URL + '/config/stats.jans_stat.readonly'

export const USER_READ = BASE_URL + '/config/user.readonly'
export const USER_WRITE = BASE_URL + '/config/user.write'
export const USER_DELETE = BASE_URL + '/config/user.delete'

export const SESSION_READ = BASE_URL + '/jans-auth-server/session.readonly'
export const SESSION_DELETE = BASE_URL + '/jans-auth-server/session.delete'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,13 @@ function UserList(props) {
dispatch(getAttributesRoot({pattern:usedAttributes.toString(), limit:100}))
}
},[usersList])

console.log("USER READ",USER_READ)
console.log("USER PERM",permissions)
return (
<GluuLoader blocking={loading}>
<Card style={applicationStyle.mainCard}>
<CardBody>
<GluuViewWrapper canShow={hasPermission(permissions, ROLE_READ)}>
<GluuViewWrapper canShow={hasPermission(permissions, USER_READ)}>
{usersList.length > 0 && (
<MaterialTable
key={limit}
Expand Down

0 comments on commit 9794f29

Please sign in to comment.