Make WordPress Core


Ignore:
Timestamp:
02/09/2011 05:30:46 PM (14 years ago)
Author:
ryan
Message:

Add additional promote_users checks. Show Add existing button only for multisite. Don't show bulk actions if user can't promote users. Show add new user menu if user has create_users but not promote_users. Props nacin. fixes #16501 for 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-admin/user-new.php

    r17069 r17432  
    1010require_once('./admin.php');
    1111
    12 if ( ! current_user_can('create_users') && ! current_user_can('promote_users') )
    13     wp_die(__('Cheatin’ uh?'));
     12if ( is_multisite() ) {
     13    if ( ! current_user_can( 'create_users' ) && ! current_user_can( 'promote_users' ) )
     14        wp_die( __( 'Cheatin’ uh?' ) );
     15} elseif ( ! current_user_can( 'create_users' ) ) {
     16    wp_die( __( 'Cheatin’ uh?' ) );
     17}
    1418
    1519if ( is_multisite() ) {
Note: See TracChangeset for help on using the changeset viewer.