mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
Ensure we're checking when looking for is_super_admin() in map_meta_cap(). Bump DB version.
fixes #14454 for trunk. git-svn-id: http://svn.automattic.com/wordpress/trunk@15480 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f243603e64
commit
2f90a8c63c
@ -812,7 +812,7 @@ function map_meta_cap( $cap, $user_id ) {
|
|||||||
// Fall through
|
// Fall through
|
||||||
case 'edit_users':
|
case 'edit_users':
|
||||||
// If multisite these caps are allowed only for super admins.
|
// 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';
|
$caps[] = 'do_not_allow';
|
||||||
else
|
else
|
||||||
$caps[] = 'edit_users'; // Explicit due to primitive fall through
|
$caps[] = 'edit_users'; // Explicit due to primitive fall through
|
||||||
@ -991,7 +991,7 @@ function map_meta_cap( $cap, $user_id ) {
|
|||||||
$caps[] = 'read_private_pages';
|
$caps[] = 'read_private_pages';
|
||||||
break;
|
break;
|
||||||
case 'unfiltered_upload':
|
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;
|
$caps[] = $cap;
|
||||||
else
|
else
|
||||||
$caps[] = 'do_not_allow';
|
$caps[] = 'do_not_allow';
|
||||||
@ -1028,7 +1028,7 @@ function map_meta_cap( $cap, $user_id ) {
|
|||||||
case 'delete_user':
|
case 'delete_user':
|
||||||
case 'delete_users':
|
case 'delete_users':
|
||||||
// If multisite these caps are allowed only for super admins.
|
// 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';
|
$caps[] = 'do_not_allow';
|
||||||
else
|
else
|
||||||
$caps[] = $cap;
|
$caps[] = $cap;
|
||||||
|
@ -15,7 +15,7 @@ $wp_version = '3.1-alpha';
|
|||||||
*
|
*
|
||||||
* @global int $wp_db_version
|
* @global int $wp_db_version
|
||||||
*/
|
*/
|
||||||
$wp_db_version = 15260;
|
$wp_db_version = 15477;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the TinyMCE version
|
* Holds the TinyMCE version
|
||||||
|
Loading…
x
Reference in New Issue
Block a user