MINOR shuffled permissions around, gave them help text and categorized them.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@90371 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2009-10-29 00:55:20 +00:00
parent 85d722d275
commit e3d678f8ad
2 changed files with 20 additions and 11 deletions

View File

@ -1289,22 +1289,26 @@ JS;
function providePermissions() {
$classes = ClassInfo::subclassesFor('LeftAndMain');
foreach($classes as $class) {
foreach($classes as $i => $class) {
$title = _t("{$class}.MENUTITLE", LeftAndMain::menu_title_for_class($class));
$perms["CMS_ACCESS_" . $class] = sprintf(
_t(
$perms["CMS_ACCESS_" . $class] = array(
'name' => sprintf(_t(
'CMSMain.ACCESS',
"Access to '%s'",
"Access to %s",
PR_MEDIUM,
"Item in permission selection identifying the admin section, with title and classname. Example: Access to 'Files & Images' (AssetAdmin)"
),
$title
"Item in permission selection identifying the admin section, with title and classname. Example: Access to Files & Images"
), $title),
'category' => 'CMS Access'
);
}
$perms["CMS_ACCESS_LeftAndMain"] = _t(
'CMSMain.ACCESSALLINTERFACES',
'Access to all CMS sections'
$perms["CMS_ACCESS_LeftAndMain"] = array(
'name' => _t('CMSMain.ACCESSALLINTERFACES', 'Access to all CMS sections'),
'category' => 'CMS Access',
'sort' => -100
);
if (isset($perms['CMS_ACCESS_ModelAdmin'])) unset($perms['CMS_ACCESS_ModelAdmin']);
return $perms;
}

View File

@ -262,7 +262,12 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
function providePermissions() {
return array(
'EDIT_PERMISSIONS' => _t('SecurityAdmin.EDITPERMISSIONS', 'Manage permissions for groups'),
'EDIT_PERMISSIONS' => array(
'name' => _t('SecurityAdmin.EDITPERMISSIONS', 'Manage permissions for groups'),
'category' => 'Roles and access permissions',
'help' => 'Ability to edit Permissions and IP Addresses for a group. Requires "Access to Security".',
'sort' => 0
)
);
}
}