Ticket #6506: 6506.01.patch
File 6506.01.patch, 1.0 KB (added by , 9 years ago) |
---|
-
src/bp-messages/bp-messages-screens.php
195 195 function messages_screen_notices() { 196 196 global $notice_id; 197 197 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; 200 202 } 201 203 202 204 $notice_id = (int)bp_action_variable( 1 ); -
src/bp-messages/bp-messages-template.php
412 412 'meta_query' => array() 413 413 ), 'has_message_threads' ); 414 414 415 // If trying to access notices without capabilities, redirect to root domain416 if ( bp_is_current_action( 'notices' ) && !bp_current_user_can( 'bp_moderate' ) ) {417 bp_core_redirect( bp_displayed_user_domain() );418 }419 420 415 // Load the messages loop global up with messages 421 416 $messages_template = new BP_Messages_Box_Template( $r ); 422 417