Skip to:
Content

BuddyPress.org

Changeset 7387


Ignore:
Timestamp:
09/18/2013 12:11:47 AM (12 years ago)
Author:
boonebgorges
Message:

Don't use is_super_admin() to die out of group/activity admin pages

Use current_user_can( 'bp_moderate' ) instead.

This gives more flexibility in customizing who can access.

Fixes #5177

Props asakurayoh for the initial patch

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-admin.php

    r7375 r7387  
    8989    // @todo: Check if user is allowed to create new activity items
    9090    // if ( ! current_user_can( 'bp_new_activity' ) )
    91     if ( ! is_super_admin() )
     91    if ( ! current_user_can( 'bp_moderate' ) )
    9292        die( '-1' );
    9393
  • trunk/bp-groups/bp-groups-admin.php

    r7378 r7387  
    423423function bp_groups_admin_edit() {
    424424
    425     if ( ! is_super_admin() )
     425    if ( ! current_user_can( 'bp_moderate' ) )
    426426        die( '-1' );
    427427
Note: See TracChangeset for help on using the changeset viewer.