setEditDescription(false)}
- onDescriptionEdit={() => setEditDescription(true)}
- onDescriptionUpdate={handleDescriptionUpdate}
- />
-
-
-
-
-
-
-
- setEntity({ record, attribute: 'policies' })
- }
- />
-
-
-
-
- setEntity({ record, attribute: 'teams' })
- }
- />
-
-
-
- setEntity({ record, attribute: 'users' })
- }
- />
-
-
+ <>
+ {isEmpty(role) ? (
+
+
+
+ {t('message.no-entity-found-for-name', {
+ entity: t('label.role'),
+ name: fqn,
+ })}
+
+
- )}
- >
- ) : (
-
- )}
+
+ ) : (
+
+
+ {getEntityName(role)}
+
+ setEditDescription(false)}
+ onDescriptionEdit={() => setEditDescription(true)}
+ onDescriptionUpdate={handleDescriptionUpdate}
+ />
+
+
+
+
+
+
+
+ setEntity({ record, attribute: 'policies' })
+ }
+ />
+
+
+
+
+ setEntity({ record, attribute: 'teams' })
+ }
+ />
+
+
+
+ setEntity({ record, attribute: 'users' })
+ }
+ />
+
+
+
+ )}
+ >
+
{selectedEntity && (
,
},
{
label: i18next.t('label.policy-plural'),
- isProtected: userPermissions.hasViewPermissions(
- ResourceEntity.POLICY,
- permissions
- ),
+ isProtected: Boolean(isAdminUser),
key: 'access.policies',
icon: ,
},