Opened 2 years 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: | changes-requested 2nd-opinion needs-patch |
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';
Attachments (2)
Change History (20)
#2
@
2 years 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.
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
19 months ago
This ticket was mentioned in Slack in #buddypress by imath. View the logs.
17 months ago
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
11 months ago
#10
@
8 months ago
- Milestone changed from 14.0.0 to Up Next
I'm not going to get this built for v14.
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
4 months ago
@
4 months ago
BP Members Admin: Use a BP-specific capability which is then mapped to the correct network or single-site edit user cap. This allows plugins to catch and set their own caps for our specific capability.
@
3 months ago
Replace generic calls to bp_user_can( 'bp_moderate' )
with more specific capability checks when possible. We fall back to bp_moderate still, but this allows plugins to handle these cases in more specific ways if desired.
#16
@
3 months ago
- Milestone changed from 15.0.0 to Up Next
@espellcaste The second patch is larger and we'll revisit it, so I'll change the version tag. Thanks!
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