Skip to:

Opened 11 months ago

Last modified 3 months ago

#8794 assigned feature request

Site membership requests: Create/change capability to approve requests

Reported by: leorospo's profile leorospo Owned by: dcavins's profile dcavins
Milestone: Up Next Priority: normal
Severity: normal Version: 11.0.0
Component: Members Keywords: has-patch changes-requested 2nd-opinion


An admin is not able to allow custom roles to approve site membership requests. This might be by design, however it would make sense to allow admins to have granular control over who can access the bp-signups tab in the user screen, and thus allow single users or custom roles to approve the site membership requests.

This can be accomplished by creating a new capability or by using bp_moderate to check for premission. At the moment the functionality is mapped to edit_users, and it might not be desired to allow for that as well.

// file: class-bp-members-admin.php
// line 109
$this->capability = bp_core_do_network_admin() ? 'manage_network_users' : 'edit_users';

// proposed change
$this->capability = bp_core_do_network_admin() ? 'manage_network_users' : 'bp_moderate';

Change History (6)

#1 @imath
11 months ago

  • Milestone changed from Awaiting Review to Awaiting Contributions

Hi @leorospo

Thanks for your feedback. Having granular community caps is something we've already thought of. It's a quite complex task but we're open to suggestions and patches or PRs. The bp_moderate might be too broad imho, because we use it a lot into our code base.


#2 @dcavins
10 months ago

  • Component changed from Core to Members
  • Milestone changed from Awaiting Contributions to 12.0.0
  • Owner set to dcavins
  • Status changed from new to assigned

I agree entirely with this, though I'm with @imath that bp_moderate is too broad. Ideally, the cap would be manage_membership_requests and we'll map it to a meta cap (like bp_moderate or edit_users) and leave maximum flexibility. I'm happy to move this logic into a meta_caps filter function.

#3 @imath
10 months ago

Great idea @dcavins let’s do this!

This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.

4 months ago

This ticket was mentioned in Slack in #buddypress by imath. View the logs.

3 months ago

#6 @imath
3 months ago

  • Milestone changed from 12.0.0 to Up Next
Note: See TracTickets for help on using tickets.