[buddypress-trac] [BuddyPress] #2701: BP_Group_Extension - Adding Navigation Item
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Tue Nov 2 14:38:44 UTC 2010
#2701: BP_Group_Extension - Adding Navigation Item
-----------------------+----------------------------------------------------
Reporter: andrewteg | Owner:
Type: defect | Status: new
Priority: major | Milestone: 1.2.6
Component: Core | Keywords: BP_Group_Extension, nav_item, group extension api
-----------------------+----------------------------------------------------
Changes (by andrewteg):
* cc: andrewteg (added)
Comment:
I'm not sure if you take fixes or not, but here is what I believe will fix
this bug:
File: bp-groups-classes.php
Class: class BP_Group_Extension (line 1136)
Function: function _register() (line 1183)
Fix: line 1198
Currently: if ( $this->enable_edit_item ) {
Proposed Fix: if ( $this->enable_edit_item && $bp->is_item_admin ) {
You can then remove the true problem lines of 1201-1203 where it returns
false if a user is not an item admin. Most users should not be item admins
but the default is properly set to enable_edit_item so admins can edit it.
I believe this means non admins hit that return on line 1203 so the code
to only show the tab to non-admins starting on line 1220 will never fire,
making the group extension API non-visible to non-admins. By checking both
cases initially it should allow non-admins to just skip that code block
and let line 1220 fire based on settings but not have even direct URL
admin access to the plugin's admin screen while admins can still view and
admin just fine.
Thanks for considering this,
Andrew
--
Ticket URL: <http://trac.buddypress.org/ticket/2701#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list