Skip to:
Content

bbPress.org

Changeset 5079


Ignore:
Timestamp:
08/19/2013 07:20:19 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Do not allow forum/topic/reply author to edit their own replies via wp-admin. Fixes #2389.

Location:
trunk/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/forums/capabilities.php

    r4995 r5079  
    137137                                        $caps[] = 'do_not_allow';
    138138
    139                                 // User is author so allow edit
    140                                 } elseif ( (int) $user_id === (int) $_post->post_author ) {
     139                                // User is author so allow edit if not in admin
     140                                } elseif ( !is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
    141141                                        $caps[] = $post_type->cap->edit_posts;
    142142
  • trunk/includes/replies/capabilities.php

    r4995 r5079  
    126126                                        $caps[] = 'do_not_allow';
    127127
    128                                 // User is author so allow edit
    129                                 } elseif ( (int) $user_id === (int) $_post->post_author ) {
     128                                // User is author so allow edit if not in admin
     129                                } elseif ( !is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
    130130                                        $caps[] = $post_type->cap->edit_posts;
    131131
  • trunk/includes/topics/capabilities.php

    r4995 r5079  
    144144                                        $caps[] = 'do_not_allow';
    145145
    146                                 // User is author so allow edit
    147                                 } elseif ( (int) $user_id === (int) $_post->post_author ) {
     146                                // User is author so allow edit if not in admin
     147                                } elseif ( !is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) {
    148148                                        $caps[] = $post_type->cap->edit_posts;
    149149
Note: See TracChangeset for help on using the changeset viewer.