Opened 7 years ago
Closed 5 years ago
#8070 closed defect (bug) (fixed)
Missing 'edit_users' check in member_can_edit()
| Reported by: | Venutius | Owned by: | dcavins |
|---|---|---|---|
| Priority: | normal | Milestone: | 10.0.0 |
| Component: | Members | Version: | 4.2.0 |
| Severity: | normal | Keywords: | needs-patch good-first-bug |
| Cc: |
Description
There seems to be a missing check for edit_users capability in the member_can_edit function on line 329 of bussypress/bp-members/classes/class-bp-members-admin.php:
$retval = bp_current_user_can( 'bp_moderate' );
This could be changed to:
$retval = ( bp_current_user_can( 'bp_moderate' ) || current_user_can( 'edit_users' ) );
Change History (2)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @Venutius
Thanks for your feedback. I believe the
bp_moderatecap should include in a way theedit_userscap as it is dynamically added to Administrators or Super Administrators on multisite. See https://wordpress.org/support/article/roles-and-capabilities/I guess the need for the
edit_userscheck is linked to custom roles?I'd like to see a patch about it, if this can happen, I'm fine with including it into 10.0.0