Ticket #43877: 43877.diff
File 43877.diff, 1.0 KB (added by , 6 years ago) |
---|
-
src/wp-includes/class-wp-user.php
736 736 $args = array_merge( array( $cap, $this->ID ), $args ); 737 737 $caps = call_user_func_array( 'map_meta_cap', $args ); 738 738 739 // Multisite super admin has all caps by definition, Unless specifically denied. 739 if ( in_array( 'do_not_allow', $caps, true ) ) { 740 return false; 741 } 742 743 // Multisite super admin has all caps by definition. 740 744 if ( is_multisite() && is_super_admin( $this->ID ) ) { 741 if ( in_array( 'do_not_allow', $caps ) ) {742 return false;743 }744 745 return true; 745 746 } 746 747 … … 760 761 // Everyone is allowed to exist. 761 762 $capabilities['exist'] = true; 762 763 763 // Nobody is allowed to do things they are not allowed to do.764 unset( $capabilities['do_not_allow'] );765 766 764 // Must have ALL requested caps. 767 765 foreach ( (array) $caps as $cap ) { 768 766 if ( empty( $capabilities[ $cap ] ) ) {