Make WordPress Core


Ignore:
Timestamp:
04/05/2010 02:59:10 AM (14 years ago)
Author:
wpmuguru
Message:

more manage_network_* caps, see #12109

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/user-edit.php

    r13941 r14003  
    5959
    6060// Only allow super admins on multisite to edit every user.
    61 if ( is_multisite() && ! is_super_admin() && $user_id != $current_user->ID && ! apply_filters( 'enable_edit_any_user_configuration', true ) )
     61if ( is_multisite() && ! current_user_can( 'manage_network_users' ) && $user_id != $current_user->ID && ! apply_filters( 'enable_edit_any_user_configuration', true ) )
    6262    wp_die( __( 'You do not have permission to edit this user.' ) );
    6363
     
    122122        delete_user_meta( $user_id, $blog_prefix . 'capabilities' );
    123123
    124     if ( is_multisite() && is_super_admin() && !IS_PROFILE_PAGE )
     124    if ( is_multisite() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) )
    125125        empty( $_POST['super_admin'] ) ? revoke_super_admin( $user_id ) : grant_super_admin( $user_id );
    126126}
     
    142142?>
    143143
    144 <?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) ) { ?>
     144<?php if ( !IS_PROFILE_PAGE && is_super_admin( $profileuser->ID ) && current_user_can( 'manage_network_options' ) ) { ?>
    145145    <div class="updated"><p><strong><?php _e('Important:'); ?></strong> <?php _e('This user has super admin privileges.'); ?></p></div>
    146146<?php } ?>
     
    236236?>
    237237</select>
    238 <?php if ( is_multisite() && is_super_admin() ) { ?>
     238<?php if ( is_multisite() && current_user_can( 'manage_network_options' ) ) { ?>
    239239<p><label><input type="checkbox" id="super_admin" name="super_admin"<?php checked( is_super_admin( $profileuser->ID ) ); ?> /> <?php _e( 'Grant this user super admin privileges for the Network.'); ?></label></p>
    240240<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.