Skip to:
Content

BuddyPress.org

Changeset 12858


Ignore:
Timestamp:
03/16/2021 06:48:25 PM (4 years ago)
Author:
imath
Message:

Make sure a just demoted Admin cannot edit/delete/add BP types

(trunk)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/classes/class-bp-admin-types.php

    r12730 r12858  
    147147    private function handle_action( $action ) {
    148148        $referer = wp_get_referer();
     149
     150        if ( ! bp_current_user_can( 'bp_moderate' ) ) {
     151            return;
     152        }
    149153
    150154        // Adding a new type into the database.
Note: See TracChangeset for help on using the changeset viewer.