Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/25/2016 01:23:29 AM (9 years ago)
Author:
johnjamesjacoby
Message:

Moderators: pass current forum/topic/reply ID into moderate capability checks, providing additional context about what's being moderated so more targeted decisions can be made.

See #459.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/functions.php

    r6027 r6032  
    389389
    390390            // What's the caps?
    391             if ( current_user_can( 'moderate' ) ) {
     391            if ( current_user_can( 'moderate', $topic_id ) ) {
    392392
    393393                // What's the haps?
     
    428428
    429429            // User can moderate, so redirect to topic with view all set
    430             if ( current_user_can( 'moderate' ) ) {
     430            if ( current_user_can( 'moderate', $topic_id ) ) {
    431431                $redirect_url = bbp_add_view_all( $redirect_url );
    432432
     
    760760
    761761            // What's the caps?
    762             if ( current_user_can( 'moderate' ) ) {
     762            if ( current_user_can( 'moderate', $topic_id ) ) {
    763763
    764764                // What's the haps?
Note: See TracChangeset for help on using the changeset viewer.