File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {AUTHORITIES, isUserAllowed} from "../utils/UserRole";
1111import { deriveApplicationAttributes } from "../utils/Manage" ;
1212import { isEmpty , stopEvent } from "../utils/Utils" ;
1313import { Entities } from "../components/Entities" ;
14- import { chipTypeForUserRole } from "../utils/Authority" ;
14+ import { authorityForRole , chipTypeForUserRole } from "../utils/Authority" ;
1515import AlertLogo from "@surfnet/sds/icons/functional-icons/alert-circle.svg" ;
1616
1717export const Application = ( ) => {
@@ -89,9 +89,13 @@ export const Application = () => {
8989 {
9090 key : "authority" ,
9191 header : I18n . t ( "roles.authority" ) ,
92- mapper : role => < Chip type = { chipTypeForUserRole ( role . authority ) }
93- label = { role . isUserRole ? I18n . t ( `access.${ role . authority } ` ) :
94- I18n . t ( "roles.noMember" ) } />
92+ mapper : role => {
93+ const type = chipTypeForUserRole ( role . authority ) ;
94+ const authority = authorityForRole ( user , role ) ;
95+ return < Chip type = { type }
96+ label = { isEmpty ( authority ) ? I18n . t ( "roles.noMember" ) :
97+ I18n . t ( `access.${ authority } ` ) } />
98+ }
9599 } ,
96100 {
97101 key : "userRoleCount" ,
You can’t perform that action at this time.
0 commit comments