Skip to:
Content

BuddyPress.org

Changeset 5462


Ignore:
Timestamp:
12/08/2011 03:30:42 AM (15 years ago)
Author:
boonebgorges
Message:

When a non-admin of a group attempts to visit a group admin tab, redirect with bp_core_no_access() rather than 404. Fixes #3694

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-loader.php

    r5412 r5462  
    197197                                }
    198198                        }
     199                       
     200                        // Protect the admin tab from non-admins
     201                        if ( bp_is_current_action( 'admin' ) && !bp_is_item_admin() ) {
     202                                bp_core_no_access( array(
     203                                        'message'  => __( 'You are not an admin of this group.', 'buddypress' ),
     204                                        'root'     => bp_get_group_permalink( $bp->groups->current_group ),
     205                                        'redirect' => false
     206                                ) );
     207                        }
    199208                }
    200209
Note: See TracChangeset for help on using the changeset viewer.