[wp-trac] [WordPress Trac] #18164: Users with capes don't need promote_users on their new role
WordPress Trac
wp-trac at lists.automattic.com
Mon Jul 18 20:30:13 UTC 2011
#18164: Users with capes don't need promote_users on their new role
---------------------------+-----------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Network Admin | Version:
Severity: normal | Keywords:
---------------------------+-----------------
When setting your own role:
{{{
// The new role of the current user must also have
promote_users caps
if ( $id == $current_user->ID &&
!$wp_roles->role_objects[$_REQUEST['new_role']]->has_cap('promote_users')
) {
$update = 'err_admin_role';
continue;
}
}}}
There's no reason to prevent a super admin from demoting themselves on a
site.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18164>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list