[buddypress-trac] [BuddyPress Trac] #4785: Decouple "visibility" and "access" properties

buddypress-trac noreply at wordpress.org
Fri Mar 7 02:33:23 UTC 2014


#4785: Decouple "visibility" and "access" properties
-------------------------+------------------
 Reporter:  smninja      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.0
Component:  Groups       |     Version:  1.7
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------
Changes (by boonebgorges):

 * keywords:  has-patch dev-feedback => needs-patch


Comment:

 I've spent some time with this patch. I like the idea behind it. But I
 think it's not going to be possible to implement without some fairly major
 changes to the way that group access protection currently works.

 At the moment, group access protection happens in the BP_Groups_Component
 setup_globals() method:
 https://buddypress.trac.wordpress.org/browser/tags/1.9.2/bp-groups/bp-
 groups-loader.php#L256 If a user is deemed not to have access according to
 the logic laid out here, then the user is either given a 404 (in the case
 of hidden groups) or redirected somewhere. The problem is that this is
 happening long before any group extensions have had a chance to load
 themselves. Group extension plugins are only invoked at 'bp_init', and
 really are only bootstrapped at 'bp_actions:8'.
 https://buddypress.trac.wordpress.org/browser/tags/1.9.2/bp-groups/bp-
 groups-classes.php#L3831

 We can't well load group extension before the groups component. So the
 only other option is to try moving group access protection much later in
 the process. I've played with this a bit in 4785.02.patch. But I'm having
 a hard time getting it to work with all cases - I get some odd redirects.
 It's possible that this is due to my being bleary-eyed at the moment, so
 I'm posting the patch in case anyone else wants to pick it up from here.

 If we *do* do something like 02.patch, you'll see that then we have a
 central value - bp_groups_user_has_access - that we can filter in the
 group extension. I still think there is some confusion about what
 'visibility' means next to the idea of 'access', but at least we'd be
 partway to something workable.

 If dcavins or anyone wants to run with my updated patch, please be my
 guest. I'll leave this in the milestone for now, but in the absence of
 substantial patches, I don't think I'll be able to put in the necessary
 time to get this to happen for 2.0 - there are too many moving parts, and
 too many bits that need testing.

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


More information about the buddypress-trac mailing list