Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/16/2017 03:14:59 PM (7 years ago)
Author:
johnjamesjacoby
Message:

Forums: Use edit_forum instead of keep_gate in the admin toggle/row methods.

This change trusts the edit_forum meta capability to serve it's intended purpose. It also allows more flexibility with things like BuddyPress Group Forums or custom forum-ownership style extensions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/forums.php

    r6438 r6559  
    414414
    415415        // What is the user doing here?
    416         if ( ! current_user_can( 'keep_gate', $forum_id ) ) {
     416        if ( ! current_user_can( 'edit_forum', $forum_id ) ) {
    417417            wp_die( __( 'You do not have permission to do that.', 'bbpress' ) );
    418418        }
     
    680680
    681681        // Only show the actions if the user is capable of viewing them :)
    682         if ( current_user_can( 'keep_gate', $forum->ID ) ) {
     682        if ( current_user_can( 'edit_forum', $forum->ID ) ) {
    683683
    684684            // Show the 'close' and 'open' link on published, private, hidden and closed posts only
Note: See TracChangeset for help on using the changeset viewer.