[buddypress-trac] [BuddyPress Trac] #8071: bp_current_user_can not returning expected results for bp_moderate users

buddypress-trac noreply at wordpress.org
Fri Mar 22 12:44:43 UTC 2019


#8071: bp_current_user_can not returning expected results for bp_moderate users
--------------------------+-----------------------------
 Reporter:  Venutius      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 If I assign a user bp_moderate capability, and give then list_users also.
 The user list does not display the extended profile link as I would
 expect.

 The code that prints this link is in `buddypress/bp-members/classes/class-
 bp-members-admin.php line 1277:

 `if ( current_user_can( 'edit_user', $user->ID ) || bp_current_user_can(
 'bp_moderate' ) ) {` (edit_user typo reported in ticket #8069)

 so giving bp_moderate capability to a user should allow that link to be
 displayed, however it does not.

 Tracing this back I can see that wp's user_can will return true for
 bp_moderate for the administrator, but not for contributor, even though
 that capability has been added to the role. Is there something else I need
 to do in order to enable other roles to have bp_moderate?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8071>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list