mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Respecting SecurityAdmin::$hidden_permissions in PermissionRole->getCMSFields()
MINOR Setting PermissionRole $singular_name and $plural_name git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100771 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
035731cd3f
commit
1c4069f53c
@ -22,18 +22,26 @@ class PermissionRole extends DataObject {
|
||||
|
||||
static $default_sort = 'Title';
|
||||
|
||||
static $singular_name = 'Role';
|
||||
|
||||
static $plural_name = 'Roles';
|
||||
|
||||
function getCMSFields() {
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->removeFieldFromTab('Root', 'Codes');
|
||||
$fields->removeFieldFromTab('Root', 'Groups');
|
||||
|
||||
$fields->addFieldToTab('Root.Main', new PermissionCheckboxSetField(
|
||||
$fields->addFieldToTab(
|
||||
'Root.Main',
|
||||
$permissionField = new PermissionCheckboxSetField(
|
||||
'Codes',
|
||||
singleton('Permission')->i18n_plural_name(),
|
||||
'PermissionRoleCode',
|
||||
'RoleID'
|
||||
));
|
||||
)
|
||||
);
|
||||
$permissionField->setHiddenPermissions(SecurityAdmin::$hidden_permissions);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user