Make WordPress Core


Ignore:
Timestamp:
04/22/2010 07:48:13 PM (16 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/includes/template.php

    r14176 r14189  
    18131813    $checkbox = '';
    18141814    // Check if the user for this row is editable
    1815     if ( current_user_can( 'edit_user', $user_object->ID ) ) {
     1815    if ( current_user_can( 'list_users', $user_object->ID ) ) {
    18161816        // Set up the user editing link
    18171817        // TODO: make profile/user-edit determination a separate function
     
    18251825        // Set up the hover actions for this user
    18261826        $actions = array();
    1827         $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
     1827
     1828        if ( current_user_can('edit_user',  $user_object->ID) )
     1829            $actions['edit'] = '<a href="' . $edit_link . '">' . __('Edit') . '</a>';
    18281830        if ( !is_multisite() && $current_user->ID != $user_object->ID && current_user_can('delete_user', $user_object->ID) )
    18291831            $actions['delete'] = "<a class='submitdelete' href='" . wp_nonce_url("users.php?action=delete&amp;user=$user_object->ID", 'bulk-users') . "'>" . __('Delete') . "</a>";
Note: See TracChangeset for help on using the changeset viewer.