Skip to content

Commit

Permalink
Fixed prettier issue
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay committed May 31, 2024
1 parent 76cf36e commit c3b1209
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions plugins/rbac/src/hooks/useRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,27 +131,29 @@ export const useRoles = (
policies as RoleBasedPolicy[],
);

return [
...acc,
{
id: role.name,
name: role.name,
description: role.metadata?.description ?? '-',
members: role.memberReferences,
permissions: role.conditionalPoliciesCount + permissions,
modifiedBy: '-',
lastModified: '-',
actionsPermissionResults: {
delete: deletePermissionResult,
edit: {
allowed:
editPermissionResult.allowed && canReadUsersAndGroups,
loading: editPermissionResult.loading,
return [
...acc,
{
id: role.name,
name: role.name,
description: role.metadata?.description ?? '-',
members: role.memberReferences,
permissions: role.conditionalPoliciesCount + permissions,
modifiedBy: '-',
lastModified: '-',
actionsPermissionResults: {
delete: deletePermissionResult,
edit: {
allowed:
editPermissionResult.allowed && canReadUsersAndGroups,
loading: editPermissionResult.loading,
},
},
},
},
];
}, [])
];
},
[],
)
: [],
[
newRoles,
Expand Down

0 comments on commit c3b1209

Please sign in to comment.