[buddypress-trac] [BuddyPress Trac] #5121: Review and improve capabilities checks
buddypress-trac
noreply at wordpress.org
Thu Jun 18 22:34:14 UTC 2015
#5121: Review and improve capabilities checks
------------------------------------+------------------------------
Reporter: ericlewis | Owner: johnjamesjacoby
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future Release
Component: API - Roles/Capability | Version:
Severity: normal | Resolution:
Keywords: dev-feedback |
------------------------------------+------------------------------
Changes (by thebrandonallen):
* type: defect (bug) => enhancement
Comment:
Up is a first pass at adding group capabilities.
All tests still pass. We probably need more. @boone, I'm looking to you
for direction here.
There are a few spots where `current_user_can()` is used instead of
`bp_current_user_can()`, but since it was code added fairly recently
(2.1), I left them alone for now as I was unsure if there was a specific
reason for this.
The goal of this initial pass was only to remove the usage of the
`bp_moderate` cap within groups.
The approach I've taken is completely dynamic. The caveat of this approach
is that it likely won't work with role managers without additional work.
On our part, or that of the plugin authors. This may not be an issue, but
I wanted to make sure it was considered.
I've written a basic plugin to demonstrate how this approach might be
used, which can be found here https://github.com/thebrandonallen/bp-
groups-moderator-demo.
It should also be noted that, in order for attachment:5121.01.groups.patch
to work, you will also need to apply the patch from #6501, until it's
committed to trunk.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5121#comment:21>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list