[buddypress-trac] [BuddyPress Trac] #8072: 'edit_users' capability not allowing extended profiles to be viewed/edited

buddypress-trac noreply at wordpress.org
Fri Mar 22 13:51:31 UTC 2019


#8072: 'edit_users' capability not allowing extended profiles to be viewed/edited
--------------------------+-----------------------------
 Reporter:  Venutius      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Members       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 I've raised a couple of tickets to address some capability checks for
 'edit_users' in bp membes admin ( #8069 #8070 ) however, with these
 changes in place we still don't get the desired results. Whilst those
 users can now see the 'Extended' option in the user list, clicking on it
 returns a page with a content of -1.

 This is caused by line 904 of `buddypress/bp-members/classes/class-bp-
 members-admin.php not including a check for 'edit_users':

 `if ( ! bp_current_user_can( 'bp_moderate' ) && empty(
 $this->is_self_profile ) ) {`

 I suggest we change this to:

 `if ( ! current_user_can( 'edit_users' ) && ! bp_current_user_can(
 'bp_moderate' ) && empty( $this->is_self_profile ) ) {`

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


More information about the buddypress-trac mailing list