Ticket #2348: toggle_topic_capability.diff
File toggle_topic_capability.diff, 1.1 KB (added by , 12 years ago) |
---|
-
includes/topics/template-tags.php
2536 2536 2537 2537 $topic = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) ); 2538 2538 2539 if ( empty( $topic ) || !current_user_can( ' moderate', $topic->ID ) )2539 if ( empty( $topic ) || !current_user_can( 'edit_topic', $topic->ID ) ) 2540 2540 return; 2541 2541 2542 2542 $display = bbp_is_topic_open( $topic->ID ) ? $r['close_text'] : $r['open_text']; -
includes/admin/topics.php
484 484 if ( empty( $topic ) ) 485 485 wp_die( __( 'The topic was not found!', 'bbpress' ) ); 486 486 487 if ( !current_user_can( ' moderate', $topic->ID ) ) // What is the user doing here?487 if ( !current_user_can( 'edit_topic', $topic->ID ) ) // What is the user doing here? 488 488 wp_die( __( 'You do not have the permission to do that!', 'bbpress' ) ); 489 489 490 490 switch ( $action ) {