[wp-trac] [WordPress Trac] #12104: 'moderate_comments' capability by itself should grant the user the permission to See/Edit all comments from the Comments menu.

WordPress Trac noreply at wordpress.org
Mon Nov 8 19:10:31 UTC 2021


#12104: 'moderate_comments' capability by itself should grant the user the
permission to See/Edit all comments from the Comments menu.
-------------------------------------------------+-------------------------
 Reporter:  sillybean                            |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Comments                             |     Version:  3.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-       |     Focuses:
  refresh                                        |  administration
-------------------------------------------------+-------------------------

Comment (by johnjamesjacoby):

 Hey everyone 👋 I slid into the hole of refreshing this patch and ran into
 a 🐇 of a problem.

 Once a refreshed patch is applied, the "Comments" admin menu and page are
 revealed and accessible, but none of the bulk actions work, and no row
 actions are visible to click on.

 This results in what is basically a dead-end for the user with only the
 `moderate_comments` capability applied to them.

 This is because nearly all of the code used to interact with individual
 comments uses the `edit_comment` capability, which maps to `edit_post` or
 `edit_posts` depending on if a parent Post is found or not, which @nacin
 talked about above just 12 short years ago. ⏳

 ----

 To move forward on this, WordPress needs to decide how much power the
 `moderate_comments` capability is intended to grant. For example, here is
 the array of possible core action IDs:

 {{{
 $actions = array(
         'approve'   => '',
         'unapprove' => '',
         'reply'     => '',
         'quickedit' => '',
         'edit'      => '',
         'spam'      => '',
         'unspam'    => '',
         'trash'     => '',
         'untrash'   => '',
         'delete'    => '',
 );
 }}}

 In my opinion, a hypothetical "Comment Moderator" role should be able to
 do all of those things to every comment. (This would match the intent of
 the "Moderator" role in bbPress, which is essentially an "Editor" for
 forum content.)

 But I think it is possible that another common use case matches what @smub
 linked to above, limiting some comment actions to post authors, etc...

 The next steps for an updated patch here will require some creativity and
 decision making.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/12104#comment:41>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list