[wp-trac] [WordPress Trac] #39082: Menu items in the My Sites -> Network Admin menu should use individual capability checks
WordPress Trac
noreply at wordpress.org
Mon Dec 5 17:15:21 UTC 2016
#39082: Menu items in the My Sites -> Network Admin menu should use individual
capability checks
----------------------------------------+------------------------
Reporter: johnbillion | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.8
Component: Toolbar | Version: 3.0
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses: multisite
----------------------------------------+------------------------
Comment (by achbed):
It appears that menu items are still there, because some submenu items are
legitimately available (they use alternate cap checks). For example, if
someone has {{{create_sites}}} capability, then they will still see the
{{{Sites}}} menu because the {{{Add New}}} submenu item is there. They
would not see the {{{All Sites}}} submenu item unless they also have
{{{manage_sites}}} capability.
The main {{{Sites}}} menu (when selected) always ends up at
{{{sites.php}}} - which may not be available based on the capability
check.
To fix this, we'd have to alter the top-level menu for each item based on
a capability check, and we would have to agree on where that top-level
menu should point to.
I've prepped an example patch showing the proposed logic in place for
sites and users so we can validate the approach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39082#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list