Opened 11 months ago
Last modified 3 months ago
#8794 assigned feature request
Site membership requests: Create/change capability to approve requests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Up Next | Priority: | normal |
Severity: | normal | Version: | 11.0.0 |
Component: | Members | Keywords: | has-patch changes-requested 2nd-opinion |
Cc: |
Description
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.
<?php // 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)
#2
@
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.
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.Related:
#7176
#5121