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

buddypress-trac noreply at wordpress.org
Wed Jan 23 18:33:23 UTC 2013

#4785: Decouple "visibility" and "access" properties
 Reporter:  smninja      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Groups       |    Version:  1.7
 Severity:  normal       |   Keywords:  access, visibility
 I'm trying to explain this as broad as possible to allow for a more
 abstract solution but will explain my issue as a use case for the proposed
 decoupling of "visibility" and "access" properties of the group.  This
 solution may not be optimal but it's a starting point for enhancing the
 behavior of a group's access.

 In my project, I want "private" groups to allow group information to be
 read but prohibit open membership, requiring a user requests membership
 and be approved by an admin.

 The "$visibility" variable used when extending BP_Group_Extension seems to
 infer the extension's tab will be visible to non-members @ line 1279:bp-
 groups-classes.php "Will this extension be visible to non-members of a
 group? Options: public/private" -- in practice, however, this does not
 seem to be the case.

 I have traced this visibility issue back to line 264:bp-groups-loader.php
 where two actions are hard-coded as a check for user's access:
 elseif ( !bp_is_current_action( 'home' ) && !bp_is_current_action(
 'request-membership' ) ) {

 I can edit this conditional, adding my own slug but this is is only a
 stopgap measure. In the template, I've added an elseif,

 elseif ( bp_get_group_type() == __( "Private Group", "buddypress" ) ) :
    locate_template( array( 'groups/single/front.php' ), true );

 In my exploration of this feature, it seems the definitions of "access"
 and "visibility" have been muddled together. Perhaps I'm misunderstanding
 but I wanted to open the topic up for discussion as I'm sure plugin
 authors and theme builders would have additional use cases for extending
 the scope of "private" groups.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4785>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list