diff --git a/code/SecurityAdmin.php b/code/SecurityAdmin.php index affc9ad5..80a6cc62 100644 --- a/code/SecurityAdmin.php +++ b/code/SecurityAdmin.php @@ -63,20 +63,21 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider { ) ) ); - - $fields->addFieldToTab( - 'Root.Roles', - new LiteralField( - 'RolesAddEditLink', - sprintf( - '

%s

', - $this->Link('show/root'), - // TODO This should include #Root_Roles to switch directly to the tab, - // but tabstrip.js doesn't display tabs when directly adressed through a URL pragma - _t('Group.RolesAddEditLink', 'Add/edit roles') + if(Permission::check('APPLY_ROLES')) { + $fields->addFieldToTab( + 'Root.Roles', + new LiteralField( + 'RolesAddEditLink', + sprintf( + '

%s

', + $this->Link('show/root'), + // TODO This should include #Root_Roles to switch directly to the tab, + // but tabstrip.js doesn't display tabs when directly adressed through a URL pragma + _t('Group.RolesAddEditLink', 'Add/edit roles') + ) ) - ) - ); + ); + } } $form->Actions()->insertBefore(