WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#38201 closed enhancement (fixed)

Several meta capabilities have no handling in map_meta_cap()

Reported by: johnbillion Owned by: johnbillion
Milestone: 4.7 Priority: normal
Severity: normal Version:
Component: Role/Capability Keywords:
Focuses: Cc:

Description

The following meta capabilities are used within core but do not have any handling (no case statement) in map_meta_cap(). While this is functionally fine, it does mean that it's not possible to complete the meta capability tests in #38191.

  • create_sites
  • delete_sites
  • manage_network
  • manage_sites
  • manage_network_users
  • manage_network_plugins
  • manage_network_themes
  • manage_network_options

Meta capabilities with no handling in map_meta_cap() fall back to requiring a primitive capability of the same name, so this is the functionality that should occur in map_meta_cap(). This has no functional change as these capabilities are only available to super admins.

Change History (3)

#1 @johnbillion
4 years ago

  • Owner set to johnbillion
  • Status changed from new to accepted

#2 @johnbillion
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 38695:

Role/Capability: Add explicit cases to map_meta_cap() for various meta capabilities that are used in core. This will allow more complete meta and primitive capability unit tests in #38191.

Fixes #38201

#3 @johnbillion
4 years ago

  • Keywords needs-patch removed
Note: See TracTickets for help on using tickets.