Check super admin status before mapping caps

This commit is contained in:
Jory Hogeveen 2018-10-15 23:52:47 +02:00 committed by GitHub
parent 54036f8f38
commit 00e942d0b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -403,6 +403,9 @@ add_filter( 'editable_roles', 'wc_modify_editable_roles' );
* @return array
*/
function wc_modify_map_meta_cap( $caps, $cap, $user_id, $args ) {
if ( is_multisite() && is_super_admin() ) {
return $caps;
}
switch ( $cap ) {
case 'edit_user':
case 'remove_user':