mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Only show "Roles" tab in admin/security if user has APPLY_ROLES permissions (fixes #5258) (from r101719)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111643 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6f0743fbb2
commit
261b4b9a6c
@ -63,20 +63,21 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$fields->addFieldToTab(
|
||||
'Root.Roles',
|
||||
new LiteralField(
|
||||
'RolesAddEditLink',
|
||||
sprintf(
|
||||
'<p class="add-role"><a href="%s">%s</a></p>',
|
||||
$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(
|
||||
'<p class="add-role"><a href="%s">%s</a></p>',
|
||||
$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(
|
||||
|
Loading…
Reference in New Issue
Block a user