Code

Opened 5 years ago

Closed 4 years ago

Last modified 3 years ago

#11625 closed (fixed)

Comment moderation through admin actions

Reported by: wayla Owned by: wayla
Component: contrib.comments Version: master
Severity: Keywords: comments admin actions
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

While the (currently undocumented) moderation views of the contrib.comments app are nice, it would be even nicer if the same features were available as admin actions. At least the two actions: Remove selects comments and Approve selected comments should be available. As apposed to the 'delete' action (which actually deletes comments form the db), the 'remove' action would set 'comment.is_removed = True' just as the remove view currently does.

Attachments (5)

comment_mod_actions.diff (4.3 KB) - added by wayla 5 years ago.
initial patch with tests
comment_mod_actions.2.diff (7.1 KB) - added by wayla 5 years ago.
initial patch with tests
11625.diff (7.4 KB) - added by wayla 5 years ago.
Added permission checks to action methods.
11625.2.diff (7.6 KB) - added by wayla 5 years ago.
Updated/fixed a few issues with the tests.
11625.3.diff (16.2 KB) - added by thejaswi_puthraya 4 years ago.
git-patch against the latest checkout

Download all attachments as: .zip

Change History (12)

Changed 5 years ago by wayla

initial patch with tests

comment:1 Changed 5 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

There seems to be a file missing from this, don't forget to SVN add (or whatever VCS) the new tests file.

Changed 5 years ago by wayla

initial patch with tests

comment:2 Changed 5 years ago by wayla

Thanks Alex. I noticed the missing filed right after I submitted. Anyway, I've uploaded an updated patch.

I should note that the tests don't actually pass because the TestClient returns a NotFound response. Not sure if I have the urls wrong, or if there is some trick I'm missing to turn on the admin app with the existing comment tests.

comment:3 Changed 5 years ago by Alex

  • Triage Stage changed from Unreviewed to Accepted

comment:4 Changed 5 years ago by anonymous

  • milestone set to 1.2
  • Owner changed from nobody to anonymous
  • Status changed from new to assigned
  • Version changed from 1.1-beta-1 to SVN

comment:5 Changed 5 years ago by wayla

  • Owner changed from anonymous to wayla
  • Status changed from assigned to new

Whoops that was me.

Changed 5 years ago by wayla

Added permission checks to action methods.

Changed 5 years ago by wayla

Updated/fixed a few issues with the tests.

Changed 4 years ago by thejaswi_puthraya

git-patch against the latest checkout

comment:6 Changed 4 years ago by jacob

  • Resolution set to fixed
  • Status changed from new to closed

(In [11639]) Fixed #11625: added comment moderation via admin actions.

This is BACKWARDS INCOMPATIBLE if you were using the completely undocumented moderation view from 1.1. That view's been removed in favor of the admin actions.

Thanks, Thejaswi Puthraya.

comment:7 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.