Skip to:
Content

BuddyPress.org

Changeset 9320


Ignore:
Timestamp:
01/08/2015 11:56:08 PM (11 years ago)
Author:
r-a-y
Message:

Members Admin: Set better access capabilities.

Props thomaslhotta.

Fixes #5932.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-admin.php

    r9318 r9320  
    106106
    107107        // Capability depends on config
    108         $this->capability = bp_core_do_network_admin() ? 'manage_network_options' : 'manage_options';
     108        $this->capability = bp_core_do_network_admin() ? 'manage_network_users' : 'edit_users';
    109109
    110110        // The Edit Profile Screen id
     
    145145        // When BuddyPress is not network activated, only Super Admin can moderate signups
    146146        if ( ! empty( $this->subsite_activated ) ) {
    147             $this->capability = 'manage_network_options';
     147            $this->capability = 'manage_network_users';
    148148        }
    149149    }
     
    18621862     */
    18631863    public function signups_admin_manage( $action = '' ) {
    1864         if ( ! is_super_admin() || empty( $action ) ) {
     1864        if ( ! current_user_can( $this->capability ) || empty( $action ) ) {
    18651865            die( '-1' );
    18661866        }
Note: See TracChangeset for help on using the changeset viewer.