Skip to content

Commit

Permalink
Fix issues with admin ui loading based on permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
chamilaadhi committed Nov 3, 2023
1 parent 0b4492e commit 7c366b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions portals/admin/src/main/webapp/site/public/conf/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"docUrl": "https://apim.docs.wso2.com/en/4.2.0/",
"roles": {
"workflowManager": ["apim:api_workflow_view", "apim:api_workflow_approve", "apim:tenantInfo", "openid", "apim:admin_settings"],
"policyManager": ["apim:tier_view","apim:policies_import_export", "apim:tier_manage", "apim:tenantInfo",
"policyManager": ["apim:tier_view", "apim:tier_manage", "apim:tenantInfo",
"apim:bl_view", "apim:bl_manage", "openid", "apim:admin_settings"],
"categoriesManager": ["apim:api_category", "openid", "apim:tenantInfo", "apim:admin_settings"],
"keyManagers": ["apim:keymanagers_manage", "openid", "apim:tenantInfo", "apim:admin_settings"],
"gatewayManager": ["apim:environment_manage", "openid", "apim:admin_settings", "apim:environment_read"],
"settingsManager": ["apim:app_owner_change", "apim:app_import_export", "apim:admin_application_view","apim:scope_manage", "openid",
"settingsManager": ["apim:app_owner_change", "apim:admin_application_view","apim:scope_manage", "openid",
"apim:admin_settings", "apim:tenantInfo"]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import { useAppContext } from 'AppComponents/Shared/AppContext';
export default function Dashboard() {
const { user: { _scopes } } = useAppContext();
const hasWorkflowViewPermission = _scopes.includes('apim:api_workflow_view');
const hasPolicyViewPermission = _scopes.includes('apim:tier_view');
const hasAPICategoryViewPermission = _scopes.includes('apim:admin_operations');
const hasPolicyViewPermission = _scopes.includes('apim:admin_tier_view');
const hasAPICategoryViewPermission = _scopes.includes('apim:api_category');
return (
<ContentBase width='full' title='Dashboard' pageStyle='paperLess'>
<Grid container spacing={3} justify='center'>
Expand Down

0 comments on commit 7c366b0

Please sign in to comment.