[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 21:04:14 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
-----------------------------+------------------------
Changes (by flixos90):

 * keywords:  close reporter-feedback =>
 * status:  new => closed
 * resolution:   => wontfix
 * milestone:  Awaiting Review =>


Comment:

 I replicated this bug, but it indeed only happens when the current user is
 a super-admin, as stated above. We could try to address this with a
 workaround in `map_meta_cap()`, but since using role names with
 `current_user_can()`, I think we shouldn't address this now.

 If this problem actually occurs when not using a super-admin account,
 please reopen. Thanks for the ticket @edville101!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35007#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list