[wp-trac] [WordPress Trac] #35007: current_user_can('author') and current_user_can('contributor') returns true even if current user is administrator in multisite installation
WordPress Trac
noreply at wordpress.org
Thu Sep 22 22:28:30 UTC 2016
#35007: current_user_can('author') and current_user_can('contributor') returns true
even if current user is administrator in multisite installation
-----------------------------+------------------------
Reporter: edville101 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Role/Capability | Version: 4.4
Severity: normal | Resolution: wontfix
Keywords: | Focuses: multisite
-----------------------------+------------------------
Comment (by johnjamesjacoby):
FWIW, `current_user_can()` should always return `true` for all super
administrators (theoretically not for network administrators.)
I.E. `current_user_can( 'create_unicorns' )` should return true for super
admins.
If there are places where core is checking the role name vs. a capability,
those should be tightened up, but plugin or theme authors checking these
caps are, agreeably, risking an incompatibility against the anticipated
environment.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35007#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list