Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Ensure we're checking when looking for is_super_admin() in map_meta_c…

…ap(). Bump DB version.

fixes #14454 for the 3.0.1 tag.

git-svn-id: http://svn.automattic.com/wordpress/tags/3.0.1@15479 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 00552700cfd7c94e0d41619503c30c307df41773 1 parent af02cfd
nacin authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 wp-includes/capabilities.php
  2. +1 −1  wp-includes/version.php
6 wp-includes/capabilities.php
View
@@ -812,7 +812,7 @@ function map_meta_cap( $cap, $user_id ) {
// Fall through
case 'edit_users':
// If multisite these caps are allowed only for super admins.
- if ( is_multisite() && !is_super_admin() )
+ if ( is_multisite() && !is_super_admin( $user_id ) )
$caps[] = 'do_not_allow';
else
$caps[] = 'edit_users'; // Explicit due to primitive fall through
@@ -991,7 +991,7 @@ function map_meta_cap( $cap, $user_id ) {
$caps[] = 'read_private_pages';
break;
case 'unfiltered_upload':
- if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin() ) )
+ if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS && ( !is_multisite() || is_super_admin( $user_id ) ) )
$caps[] = $cap;
else
$caps[] = 'do_not_allow';
@@ -1028,7 +1028,7 @@ function map_meta_cap( $cap, $user_id ) {
case 'delete_user':
case 'delete_users':
// If multisite these caps are allowed only for super admins.
- if ( is_multisite() && !is_super_admin() )
+ if ( is_multisite() && !is_super_admin( $user_id ) )
$caps[] = 'do_not_allow';
else
$caps[] = $cap;
2  wp-includes/version.php
View
@@ -15,7 +15,7 @@
*
* @global int $wp_db_version
*/
-$wp_db_version = 15260;
+$wp_db_version = 15477;
/**
* Holds the TinyMCE version
Please sign in to comment.
Something went wrong with that request. Please try again.