Make WordPress Core

Opened 6 years ago

Closed 6 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 Owned by: ocean90
Priority: normal Milestone: 5.5
Component: Users Version:
Severity: normal Keywords: has-patch
Cc: Focuses: administration

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 6 years ago.

Download all attachments as: .zip

Change History (2)

#1 @ocean90
6 years ago

  • Owner set to ocean90
  • Resolution → fixed
  • Status new → 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.