#108979 by ewhipple, catch, and sun: Order permissions consistently, keep node type related permissions together.

merge-requests/26/head
Angie Byron 2008-09-17 20:37:32 +00:00
parent fb57759604
commit 893942bb4f
8 changed files with 9 additions and 10 deletions

View File

@ -41,9 +41,9 @@ function book_theme() {
*/ */
function book_perm() { function book_perm() {
return array( return array(
'add content to books' => t('Add new content and child pages to books.'),
'administer book outlines' => t('Manage books through the administration panel.'), 'administer book outlines' => t('Manage books through the administration panel.'),
'create new books' => t('Add new top-level books.'), 'create new books' => t('Add new top-level books.'),
'add content to books' => t('Add new content and child pages to books.'),
'access printer-friendly version' => t('View a book page and all of its sub-pages as a single document for ease of printing. Can be performance heavy.'), 'access printer-friendly version' => t('View a book page and all of its sub-pages as a single document for ease of printing. Can be performance heavy.'),
); );
} }

View File

@ -241,10 +241,10 @@ function comment_node_type($op, $info) {
*/ */
function comment_perm() { function comment_perm() {
return array( return array(
'administer comments' => t('Manage and approve comments, and configure comment administration settings.'),
'access comments' => t('View comments attached to content.'), 'access comments' => t('View comments attached to content.'),
'post comments' => t('Add comments to content (approval required).'), 'post comments' => t('Add comments to content (approval required).'),
'post comments without approval' => t('Add comments to content (no approval required).'), 'post comments without approval' => t('Add comments to content (no approval required).'),
'administer comments' => t('Manage and approve comments, and configure comment administration settings.'),
); );
} }

View File

@ -37,8 +37,8 @@ function contact_help($path, $arg) {
*/ */
function contact_perm() { function contact_perm() {
return array( return array(
'access site-wide contact form' => t('Send feedback to administrators via e-mail using the site-wide contact form.'),
'administer site-wide contact form' => t('Configure site-wide contact form administration settings.'), 'administer site-wide contact form' => t('Configure site-wide contact form administration settings.'),
'access site-wide contact form' => t('Send feedback to administrators via e-mail using the site-wide contact form.'),
); );
} }

View File

@ -2872,10 +2872,10 @@ function node_list_permissions($type) {
// Build standard list of node permissions for this type. // Build standard list of node permissions for this type.
$perms["create $type content"] = t('Create new %type_name content.', array('%type_name' => $info->name)); $perms["create $type content"] = t('Create new %type_name content.', array('%type_name' => $info->name));
$perms["delete any $type content"] = t('Delete any %type_name content, regardless of its author.', array('%type_name' => $info->name));
$perms["delete own $type content"] = t('Delete %type_name content created by the user.', array('%type_name' => $info->name));
$perms["edit own $type content"] = t('Edit %type_name content created by the user.', array('%type_name' => $info->name)); $perms["edit own $type content"] = t('Edit %type_name content created by the user.', array('%type_name' => $info->name));
$perms["edit any $type content"] = t('Edit any %type_name content, regardless of its author.', array('%type_name' => $info->name)); $perms["edit any $type content"] = t('Edit any %type_name content, regardless of its author.', array('%type_name' => $info->name));
$perms["delete own $type content"] = t('Delete %type_name content created by the user.', array('%type_name' => $info->name));
$perms["delete any $type content"] = t('Delete any %type_name content, regardless of its author.', array('%type_name' => $info->name));
return $perms; return $perms;
} }

View File

@ -204,8 +204,8 @@ function path_form_alter(&$form, $form_state, $form_id) {
*/ */
function path_perm() { function path_perm() {
return array( return array(
'create url aliases' => t('Manage URL aliases on content.'),
'administer url aliases' => t('Manage URL aliases across the entire website.'), 'administer url aliases' => t('Manage URL aliases across the entire website.'),
'create url aliases' => t('Manage URL aliases on content.'),
); );
} }

View File

@ -142,9 +142,9 @@ function search_theme() {
*/ */
function search_perm() { function search_perm() {
return array( return array(
'administer search' => t('Configure search administration settings.'),
'search content' => t('Search website content.'), 'search content' => t('Search website content.'),
'use advanced search' => t('Limit search results with additional criteria, such as specific content types. Could have performance implications.'), 'use advanced search' => t('Limit search results with additional criteria, such as specific content types. Could have performance implications.'),
'administer search' => t('Configure search administration settings.'),
); );
} }

View File

@ -166,11 +166,11 @@ function system_theme() {
function system_perm() { function system_perm() {
return array( return array(
'administer site configuration' => t('Configure site-wide settings such as module or theme administration settings.'), 'administer site configuration' => t('Configure site-wide settings such as module or theme administration settings.'),
'access administration pages' => t('View the administration panel and browse the help system.'),
'administer actions' => t('Manage the actions defined for your site.'), 'administer actions' => t('Manage the actions defined for your site.'),
'administer files' => t('Manage user-uploaded files.'),
'access administration pages' => t('View the administration panel and browse the help system.'),
'access site reports' => t('View reports from system logs and other status information.'), 'access site reports' => t('View reports from system logs and other status information.'),
'select different theme' => t('Select a theme other than the default theme set by the site administrator.'), 'select different theme' => t('Select a theme other than the default theme set by the site administrator.'),
'administer files' => t('Manage user-uploaded files.'),
'block IP addresses' => t('Block IP addresses from accessing your site.'), 'block IP addresses' => t('Block IP addresses from accessing your site.'),
); );
} }

View File

@ -515,7 +515,6 @@ function user_admin_perm($form_state, $rid = NULL) {
$form['permission'][] = array( $form['permission'][] = array(
'#markup' => $module, '#markup' => $module,
); );
ksort($permissions);
foreach ($permissions as $perm => $description) { foreach ($permissions as $perm => $description) {
// Account for permissions lacking a description. // Account for permissions lacking a description.
if (is_int($perm)) { if (is_int($perm)) {