[buddypress-trac] [BuddyPress Trac] #7176: Implement user capabilities for Activity component
buddypress-trac
noreply at wordpress.org
Fri Jul 8 20:42:11 UTC 2016
#7176: Implement user capabilities for Activity component
-------------------------+-----------------------------
Reporter: DJPaul | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Activity | Version:
Severity: normal | Resolution:
Keywords: |
-------------------------+-----------------------------
Comment (by DJPaul):
So, 7176.01.patch is a first go. It contains a bunch of stuff that would
be committed individually (i.e. swapping `current_user_can` for
`bp_current_user_can`), but it helps see what the change would involve. I
gave it a perfunctory test comparing different capabilities for different
roles, and it seems to work ok.
My concern with my patch (or lack of knowledge with implementing this) is
that the capabilities work on a "take away" basis, rather than on a
"grant". For example, the patch doesn't let you grant `edit_bp_activities`
to some custom role and have it work (because the meta cap functions
checks `manage_options`, which is a direct port of what `bp_moderate`
does). I think this is because BP can't? use WP capabilities' primitives,
so things get confusing during the meta mapping.
I'd love some feedback from anyone who knows how the roles/caps API works
really well, and can help guide the patch.
I did briefly consider whether I should implement bbPress' dynamic roles,
but I think that can come later. It doesn't seem a technical prerequisite
at this stage, nor is it a small or easy thing to implement.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7176#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list