Skip to content

Commit

Permalink
feat(admin-ui): provide roles and permissions management screens in A…
Browse files Browse the repository at this point in the history
…dmin UI #339
  • Loading branch information
syntrydy committed Jan 9, 2022
1 parent 98e6318 commit f36d313
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const RoutedContent = () => {
const scopes = useSelector((state) =>
state.token ? state.token.scopes : state.authReducer.permissions,
)
console.log("###############################################")
console.log("#####"+JSON.stringify(scopes))
console.log("###############################################")
const [pluginMenus, setPluginMenus] = useState([])
useEffect(() => {
setPluginMenus(processRoutes())
Expand Down
4 changes: 2 additions & 2 deletions app/utils/PermChecker.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export const CLIENT_WRITE = BASE_URL + '/config/openid/clients.write'
export const CLIENT_DELETE = BASE_URL + '/config/openid/clients.delete'

export const ROLE_READ =
'https://jans.io/oauth/jans-auth-server/config/adminui/user/role.read'
'https://jans.io/oauth/jans-auth-server/config/adminui/user/role.readonly'
export const ROLE_WRITE =
'https://jans.io/oauth/jans-auth-server/config/adminui/user/role.write'
export const ROLE_DELETE =
'https://jans.io/oauth/jans-auth-server/config/adminui/user/role.delete'

export const PERMISSION_READ =
'https://jans.io/oauth/jans-auth-server/config/adminui/user/permission.read'
'https://jans.io/oauth/jans-auth-server/config/adminui/user/permission.readonly'
export const PERMISSION_WRITE =
'https://jans.io/oauth/jans-auth-server/config/adminui/user/permission.write'
export const PERMISSION_DELETE =
Expand Down
2 changes: 1 addition & 1 deletion plugins/admin/plugin-metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const pluginMetadata = {
{
title: 'menus.api.roles',
path: PLUGIN_BASE_APTH + '/roles',
permission: ACR_READ,
permission: ROLE_READ,
},
{
title: 'menus.api.permissions',
Expand Down

0 comments on commit f36d313

Please sign in to comment.