Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#50345 closed defect (bug) (fixed)

Add New User: Don't show roles dropdown if current user can't promote users

Reported by: ocean90's profile ocean90 Owned by: ocean90's profile ocean90
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Users Keywords: has-patch
Focuses: administration Cc:

Description

A user with the create_users cap but without the promote_users cap can still select a role on wp-admin/user-new.php. Though, the role doesn't get used due to the additional cap check in edit_user(). Therefore we should remove the roles dropdown on the page to avoid confusion.

Attachments (1)

50345.patch (682 bytes) - added by ocean90 5 years ago.

Download all attachments as: .zip

Change History (2)

@ocean90
5 years ago

#1 @ocean90
5 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 48042:

Users: On the 'Add New User' screen, don't show the roles dropdown if the current user can't promote other users.

Fixes #50345.

Note: See TracTickets for help on using tickets.