Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.797 diff -u -r1.797 user.module --- modules/user/user.module 12 Jun 2007 20:37:07 -0000 1.797 +++ modules/user/user.module 14 Jun 2007 20:18:58 -0000 @@ -444,7 +444,7 @@ * Implementation of hook_perm(). */ function user_perm() { - return array('administer access control', 'administer users', 'access user profiles', 'change own username'); + return array('administer permissions', 'administer access rules', 'create roles', 'assign roles', 'administer users', 'access user profiles', 'change own username'); } /** @@ -843,18 +843,18 @@ // Admin access pages $items['admin/user/access'] = array( - 'title' => 'Access control', + 'title' => 'Permissions', 'description' => 'Determine access to features by selecting permissions for roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_perm'), - 'access arguments' => array('administer access control'), + 'access arguments' => array('administer permissions'), ); $items['admin/user/roles'] = array( 'title' => 'Roles', 'description' => 'List, edit, or add user roles.', 'page callback' => 'drupal_get_form', 'page arguments' => array('user_admin_new_role'), - 'access arguments' => array('administer access control'), + 'access arguments' => array('create roles'), ); $items['admin/user/roles/edit'] = array( 'title' => 'Edit role', @@ -865,7 +865,7 @@ 'title' => 'Access rules', 'description' => 'List and create rules to disallow usernames, e-mail addresses, and IP addresses.', 'page callback' => 'user_admin_access', - 'access arguments' => array('administer access control'), + 'access arguments' => array('administer access rules'), ); $items['admin/user/rules/list'] = array( 'title' => 'List', @@ -1063,7 +1063,7 @@ form_set_error('name', t('The username %name has not been activated or is blocked.', array('%name' => $form_state['values']['name']))); } else if (drupal_is_denied('user', $form_state['values']['name'])) { - // denied by access controls + // denied by access rules form_set_error('name', t('The name %name is a reserved username.', array('%name' => $form_state['values']['name']))); } else if ($form_state['values']['pass']) { @@ -1454,7 +1454,7 @@ if ($admin) { $form['account']['status'] = array('#type' => 'radios', '#title' => t('Status'), '#default_value' => isset($edit['status']) ? $edit['status'] : 1, '#options' => array(t('Blocked'), t('Active'))); } - if (user_access('administer access control')) { + if (user_access('assign roles')) { $roles = user_roles(1); unset($roles[DRUPAL_AUTHENTICATED_RID]); if ($roles) { @@ -1612,7 +1612,7 @@ function user_edit_validate($form, &$form_state) { user_module_invoke('validate', $form_state['values'], $form_state['values']['_account'], $form_state['values']['_category']); // Validate input to ensure that non-privileged users can't alter protected data. - if ((!user_access('administer users') && array_intersect(array_keys($form_state['values']), array('uid', 'init', 'session'))) || (!user_access('administer access control') && isset($form_state['values']['roles']))) { + if ((!user_access('administer users') && array_intersect(array_keys($form_state['values']), array('uid', 'init', 'session'))) || (!user_access('assign roles') && isset($form_state['values']['roles']))) { watchdog('security', 'Detected malicious attempt to alter protected user fields.', array(), WATCHDOG_WARNING); // set this to a value type field form_set_error('category', t('Detected malicious attempt to alter protected user fields.')); @@ -2299,7 +2299,7 @@ ), ); - if (user_access('administer access control')) { + if (user_access('assign roles')) { $roles = user_roles(1); unset($roles[DRUPAL_AUTHENTICATED_RID]); // Can't edit authenticated role. @@ -2333,7 +2333,7 @@ $operation = $operation_rid[0]; $rid = $operation_rid[1]; if ($operation == 'add_role' || $operation == 'remove_role') { - if (user_access('administer access control')) { + if (user_access('assign roles')) { $operations[$form_values['operation']] = array( 'callback' => 'user_multiple_role_edit', 'callback arguments' => array($operation, $rid),