Skip to:
Content

BuddyPress.org

Ticket #6506: 6506.01.patch

File 6506.01.patch, 1.0 KB (added by johnjamesjacoby, 9 years ago)
  • src/bp-messages/bp-messages-screens.php

     
    195195function messages_screen_notices() {
    196196        global $notice_id;
    197197
    198         if ( !bp_current_user_can( 'bp_moderate' ) ) {
    199                 return false;
     198        // Only community moderators should be able to access notices
     199        if ( ! bp_current_user_can( 'bp_moderate' ) ) {
     200                bp_do_404();
     201                return;
    200202        }
    201203
    202204        $notice_id = (int)bp_action_variable( 1 );
  • src/bp-messages/bp-messages-template.php

     
    412412                'meta_query'   => array()
    413413        ), 'has_message_threads' );
    414414
    415         // If trying to access notices without capabilities, redirect to root domain
    416         if ( bp_is_current_action( 'notices' ) && !bp_current_user_can( 'bp_moderate' ) ) {
    417                 bp_core_redirect( bp_displayed_user_domain() );
    418         }
    419 
    420415        // Load the messages loop global up with messages
    421416        $messages_template = new BP_Messages_Box_Template( $r );
    422417