[wp-trac] [WordPress Trac] #39252: Admin Bar shows "Add User" link to users without 'create_users' cap

WordPress Trac noreply at wordpress.org
Mon Dec 12 18:30:38 UTC 2016


#39252: Admin Bar shows "Add User" link to users without 'create_users' cap
--------------------------+-----------------------------
 Reporter:  dlh           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 On a single-site install, a user needs the `create_users` capability to
 add a user, but the "User" link still appears in the Admin Bar's "New"
 menu for users with `promote_users`. (The user is blocked from adding a
 user if they visit the link.)

 At a glance, it looks like a similar issue was fixed in #30526, and the
 attached patch would take the same approach by checking `is_multisite()`
 along with `current_user_can( 'promote_users' )` before adding the link.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39252>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list