mirror of
https://github.com/bmlong137/alfresco-keycloak.git
synced 2025-09-10 14:11:09 +00:00
Enhance authority display name
This commit is contained in:
@@ -13,8 +13,6 @@ function main()
|
||||
permissionObj = permissions.getJSONObject(idx);
|
||||
add = !permissionObj.has('remove') || !permissionObj.getBoolean('remove');
|
||||
|
||||
if (add)
|
||||
{
|
||||
authority = permissionObj.getString('authority');
|
||||
permission = permissionObj.getString('role');
|
||||
|
||||
@@ -33,9 +31,15 @@ function main()
|
||||
|
||||
// only process if role mapped from Keycloak
|
||||
if (keycloakRolesHash.hasOwnProperty(authority))
|
||||
{
|
||||
if (add)
|
||||
{
|
||||
node.setPermission(permission, authority);
|
||||
}
|
||||
else
|
||||
{
|
||||
node.removePermission(permission, authority);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user