[wp-trac] [WordPress Trac] #36376: current_user_can/has_cap fails when user has multiple roles

WordPress Trac noreply at wordpress.org
Sat Apr 2 09:11:35 UTC 2016


#36376: current_user_can/has_cap fails when user has multiple roles
-------------------------------------------------+-------------------------
 Reporter:  mikejolley                           |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
Component:  Role/Capability                      |  Review
 Severity:  normal                               |     Version:
 Keywords:  has-patch reporter-feedback has-     |  Resolution:
  unit-tests                                     |     Focuses:
-------------------------------------------------+-------------------------
Changes (by johnbillion):

 * keywords:  has-patch dev-feedback needs-unit-tests => has-patch reporter-
     feedback has-unit-tests


Comment:

 We discussed this issue at WCTRN contributor day, and we couldn't
 reproduce the issue even with various permutations of WPFront User Role
 Editor and WooCommerce activated or not.

 [attachment:36376.tests.diff] is a test that demonstrates the current
 behaviour works as expected and that a user with the roles of Author and
 Customer does indeed have the `edit_posts` cap.

 Is there anything missing from that test Mike?

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


More information about the wp-trac mailing list