From 035731cd3f778911ccda1bd3477f773a4da1218e Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 10 Mar 2010 02:22:44 +0000 Subject: [PATCH] MINOR Removed "only advanced users" notice in Group->getCMSFields() - this field is now sufficiently useable for all admins with access to admin/security without knowing about permission codes git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100770 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Group.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/security/Group.php b/security/Group.php index c7d227820..92ce7f7fa 100644 --- a/security/Group.php +++ b/security/Group.php @@ -68,19 +68,9 @@ class Group extends DataObject { ), $permissionsTab = new Tab(_t('SecurityAdmin.PERMISSIONS', 'Permissions'), - new LiteralField( - "", - "

" . - _t('SecurityAdmin.ADVANCEDONLY', - "This section is for advanced users only. - See this page - for more information." - ) . - "

" - ), new PermissionCheckboxSetField( 'Permissions', - singleton('Permission')->i18n_plural_name(), + false, 'Permission', 'GroupID', $this @@ -121,6 +111,8 @@ class Group extends DataObject { $fields->removeFieldFromTab('Root', 'IP Addresses'); } + // Only show the "Roles" tab if permissions are granted to edit them, + // and at least one role exists if(Permission::check('APPLY_ROLES') && DataObject::get('PermissionRole')) { $fields->addFieldToTab('Root.' . _t('SecurityAdmin.ROLES', 'Roles'), new LiteralField(