WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12098 closed enhancement (fixed)

Should use current_user_can for [12908], users.php Add New button

Reported by: nacin Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords:
Focuses: multisite Cc:

Description

[12908] can be reverted as we already perform that check in map_meta_cap.

Additionally, we should convert that logic in users.php over to create_users.

Attachments (1)

12098.diff (1.6 KB) - added by nacin 4 years ago.

Download all attachments as: .zip

Change History (5)

nacin4 years ago

comment:1 dd324 years ago

I'll check this up again later.. if its in map_meta_cap its not working as intended

comment:2 dd324 years ago

You're right. It is there, and it does work as intended.

The problem is that has_cap() returns true for ALL caps for super users, regardless.. and the file hasnt been updated to rely on the cap.

comment:3 dd324 years ago

(In [12916]) Revert [12908]. Update Users cap to use a capability. See #12098. Props nacin

comment:4 dd324 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.