Make WordPress Core


Ignore:
Timestamp:
04/22/2010 07:48:13 PM (13 years ago)
Author:
josephscott
Message:

New 'list_users' cap to provide more controls over listing users vs. editing
users.

Apply this new cap to the 'Authors & Users' menu item and 'Users' page in
wp-admin.

Bump db version to 14139 to pick up the new cap.

See #13074

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r14127 r14189  
    173173unset($menu_perms, $update_plugins, $update_count);
    174174
    175 if ( current_user_can('edit_users') )
    176     $menu[70] = array( __('Users'), 'edit_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
     175if ( current_user_can('list_users') )
     176    $menu[70] = array( __('Users'), 'list_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
    177177else
    178178    $menu[70] = array( __('Profile'), 'read', 'profile.php', '', 'menu-top menu-icon-users', 'menu-users', 'div' );
    179179
    180 if ( current_user_can('edit_users') ) {
     180if ( current_user_can('list_users') ) {
    181181    $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
    182     $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
     182    $submenu['users.php'][5] = array(__('Authors & Users'), 'list_users', 'users.php');
    183183    $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
    184184
Note: See TracChangeset for help on using the changeset viewer.