#18164 closed defect (bug) (fixed)
Users with capes don't need promote_users on their new role
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Network Admin | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
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.
Attachments (2)
Change History (10)
comment:1
johnbillion — 22 months ago
Step 1 - Visit http://www.superherosupplies.com/
Step 2 - Add cape to cart
Step 3 - Go through check out procedure
Step 4 - Wait for delivery truck
Step 5 - Receive and Open package - find out it's shoes your wife ordered, go back outside to wait for delivery truck
Step 6 - Receive package - open - find cape
Step 7 - Wear cape.
Step 8 - Commence core hacking.
- Keywords has-patch added
Checks for cape before deciding if user can demote himself.
The more generic is_super_admin() would probably be a better fit here.
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [19024]:
Note: See
TracTickets for help on using
tickets.

How does one get a cape?