[buddypress-trac] [BuddyPress Trac] #5121: Review and improve capabilities checks

buddypress-trac noreply at wordpress.org
Tue Jun 17 08:45:59 UTC 2014


#5121: Review and improve capabilities checks
------------------------------+------------------
 Reporter:  ericlewis         |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  2.1
Component:  Roles/Capability  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  dev-feedback      |
------------------------------+------------------
Changes (by imath):

 * keywords:   => dev-feedback


Comment:

 I began writing a patch for this ticket, then i thought i should ask for
 your opinion about the road i took before going on, because i'm not sure
 it's the best one.

 In 5121.patch, i'm not really using dynamic roles, it's more like dynamic
 caps. I'm adding a method to {{{BP_Component}}} class so that each
 component (if active) can add to the current user {{{allcaps}}} their
 specific caps, then i'm using a mapping function to adjust depending on
 the context.

 I see an advantage doing so, as custom components can easily add their own
 caps directly from their extended class.

 In my suggestion, i've added some code to illustrate in case of
 publishing/deleting an activity, creating a group or accessing the delete
 my account settings subnav.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5121#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list