|
@@ -72,6 +72,29 @@ const Roles = () => {
|
|
icon: 'add',
|
|
icon: 'add',
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ {
|
|
|
|
+ type: 'iconBtn',
|
|
|
|
+ label: userTrans('editRole'),
|
|
|
|
+ onClick: async () => {
|
|
|
|
+ setDialog({
|
|
|
|
+ open: true,
|
|
|
|
+ type: 'custom',
|
|
|
|
+ params: {
|
|
|
|
+ component: (
|
|
|
|
+ <CreateRole onCreate={onCreate} handleClose={handleCloseDialog} />
|
|
|
|
+ ),
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ icon: 'edit',
|
|
|
|
+ disabled: () =>
|
|
|
|
+ selectedRole.length === 0 ||
|
|
|
|
+ selectedRole.length > 1 ||
|
|
|
|
+ selectedRole.findIndex(v => v.name === 'admin') > -1 ||
|
|
|
|
+ selectedRole.findIndex(v => v.name === 'public') > -1,
|
|
|
|
+ disabledTooltip: userTrans('disabbleEditRolePriviledgeTip'),
|
|
|
|
+ },
|
|
|
|
+
|
|
{
|
|
{
|
|
type: 'iconBtn',
|
|
type: 'iconBtn',
|
|
onClick: () => {
|
|
onClick: () => {
|