Make WordPress Core

Opened 9 months ago

Closed 9 months ago

#59123 closed defect (bug) (invalid)

Customizer "Additional CSS" panel is missing on multisite for administrators

Reported by: jakeparis's profile jakeparis Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords:
Focuses: administration, multisite Cc:

Description

In a multisite instance, any non-superadmin user can not access the Additional CSS panel in the customizer.

I assume this is a bug, as why would a site administrator not be allowed to add additional css.

According to wp-includes/class-wp-customize-manager.php:5746 (WordPress 6.3), the edit_css capability should allow access to this panel, however adding that capability to the role did not allow access.

I've seen this error in both WordPress 6.2 and 6.3.

Change History (1)

#1 @dlh
9 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version changed from trunk to 4.7

Hi @jakeparis, and welcome back to Trac!

The behavior that you describe is the expected behavior on multisite installations. The edit_css capability is meant to map to the behavior of the unfiltered_html capability, which is granted to only super administrators by default on multisite installations.

The place to look is the `map_meta_cap()` function. See also ticket:35395#comment:50, ticket:35395#comment:78, and elsewhere in #35395 for background on the decision.

Note: See TracTickets for help on using tickets.