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

buddypress-trac noreply at wordpress.org
Wed Jun 18 14:42:45 UTC 2014


#4785: Decouple "visibility" and "access" properties
-------------------------+------------------
 Reporter:  smninja      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.1
Component:  Groups       |     Version:  1.7
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------

Comment (by imath):

 Hi, first: great work boonebgorges & dcavins !!

 Then some feedbacks, i merged 04,05 & 06 patches and I think there are a
 few minor troubles with the patches.

 Before applying the patches, if on a private group and trying to access to
 the group members by editing the browser url eg : site.url/groups/group-
 slug/members, i'm redirected to group's home.

 1/ After applying the patch, i'm redirected to {{{''}}}, if testing on a
 MAMP/WAMP dev environnement i'm arriving on the localhost root. Else the
 user should land on the site's front page i guess.

 2/ Testing the different group extensions in bp4785.php, everything seems
 to work as expected as soon as the group is private. If the group is
 public and trying to access to BP4785_Ext4 for instance, i'm redirected to
 the login.php file even if i'm already loggedin, it's then an endless
 redirection to login.php

 3/ I might be wrong, but i think in
 {{{BP_Group_Extension->user_can_see_nav_item()}}} the check should be done
 on the {{{$this->params['show_tab']}}} and in
 {{{BP_Group_Extension->user_can_visit()}}} the check should be done on
 {{{$this->params['access']}}}

 In 4785.07.patch, I've tried to fix the problems, 1/ seems to find its
 origin in {{{bp-core-buddybar.php}}} and 2/ in the function
 {{{bp_groups_group_access_protection()}}} after the
 {{{bp_group_user_has_access}}} filter.

 Now, this is great for group extensions, but it doesn't seem to work if a
 plugin tries to force the display of the group members for a private group
 for instance. I've managed to show the members tab but i didn't manage to
 display the group members, i'm always redirected to group home. So, unless
 i didn't understand well, this doesn't seem to be possible :
 > But at least for now, access to core pages can be customized with the
 'bp_group_user_has_access' filter

 Though, I might do it wrong.. So i'll try some other tests.

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


More information about the buddypress-trac mailing list