WordPress.org

Make WordPress Core

Changeset 14256


Ignore:
Timestamp:
04/27/10 20:39:39 (4 years ago)
Author:
nacin
Message:

Explicitly set the capability required in edit_users map_meta_cap branch, so we don't accidentally pass edit_user. props TheDeadMedic. fixes #13074, fixes #13137

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r14244 r14256  
    783783 * This does not actually compare whether the user ID has the actual capability, 
    784784 * just what the capability or capabilities are. Meta capability list value can 
    785  * be 'delete_user', 'edit_user', 'delete_post', 'delete_page', 'edit_post', 
    786  * 'edit_page', 'read_post', or 'read_page'. 
     785 * be 'delete_user', 'edit_user', 'remove_user', 'promote_user', 'delete_post', 
     786 * 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'. 
    787787 * 
    788788 * @since 2.0.0 
     
    816816            $caps[] = 'do_not_allow'; 
    817817        else 
    818             $caps[] = $cap; 
     818            $caps[] = 'edit_users'; // Explicit due to primitive fall through 
    819819        break; 
    820820    case 'delete_post': 
Note: See TracChangeset for help on using the changeset viewer.