Force specific users through moderation


(Leo Davidson) #1

Overview:

This simple Discourse plugin adds a setting where you can list one or more usernames; any user added to the list will always have their posts held for moderator approval.

e.g. If there is someone who can’t help but be annoying or disruptive sometimes, despite warnings, but also makes worthwhile posts at other times, then you might resort to this so you can filter their good posts from their bad ones rather than ban them outright.

Alternatives:

Discourse has a built-in option to make Trust Level 0 users require moderation (mainly for forums with spam problems), and you can turn that on and then lock specific users to TL0 so they always require moderation. But if you aren’t having problems with spam then putting all new users’ posts through moderation can be unwelcoming and means their questions are answered slower.

There are also some other moderation options if you search the admin settings area for “moderation” or similar. I recommend checking them out before using the plugin, as it’s always better to use what’s built-in if you can, and the plugin relies on extending an internal class/method, which could break in future updates.

On the other hand, if none of the built-in settings fit your needs and you want to moderate one or more people by name, then this plugin is for you.

Installation:

The plugin is on github as usual: GitHub - LeoDavidson/discourse-forcemoderation: Discourse plugin to force posts by specified usernames through moderation.

Follow the Install a Plugin howto, using git clone https://github.com/leodavidson/discourse-forcemoderation.git as the plugin command.

Once you’ve installed it, go to /admin/plugins and click the Settings button for the plugin.

You’ll see a checkbox to enable/disable the plugin. It’s disabled by default, so you’ll need to enable it.

You’ll also see an empty field where you can type the usernames of people whose posts you want to be moderated. As with similar options in Discourse, type a name and then push either | (pipe) or return before typing the next one. Each name will turn into a box. Remember to push return after the last name, and then click the green tick button to save the change.


Need ability to ban one or more users from a category
(Mittineague) #2

I’m only tossing this out as food for thought.

Discourse has a muted_users table. Assuming (yes, I know) that members mute other members because they find them to be a problem, perhaps the “add name” feature could be populated based on an arbitrary threshold?

On second thought, maybe putting accepted Flags into the mix would be a good idea.


#3

Great plug-in and Thank you.

One question tho, is there any way to have a moderation alert sent to an admin so they know there’s a post that needs moderation?


Notify about flags after Bug?
(cpradio) #4

I believe it does that already if the post sits there for X hours (default 48).

See setting notify about flags after there is also one for pending users pending users reminder delay


#5

I did set that flag to 1 but I dont seem to be getting any emails. Not sure if its the Plug in or something else in discourse.


#6

Upon further inspection I think the notify flags option is for posts that have been flagged not site notifications.

Thoughts?


(Leo Davidson) #7

Not sure about emails but I get a red icon/count overlay in the top-right of the page next time I visit the site if there are posts needing moderation. (Same with ones blocked by anti-spam measures, and so on.)


#8

Ok I have confirmed that the notify about flags after does not notify about posts needing moderation.

Does anyone know how I can get an alert that a post needs moderation? This plug in is great but without that you need to constantly monitor the site looking for posts needing moderation.


#9

@LeoDavidson can you help with any of this? I need to get a notification email that something needs to be moderated.


(Leo Davidson) #10

Don’t think I can. The plugin just makes a slight change to the criteria Discourse uses to decide whether or not a post needs moderation. The plugin isn’t involved in anything which happens after that.

Even without the plugin, you would presumably see the same behavior with posts that Discourse decides need moderation for other reasons (e.g. due to the anti-spam measures).


#11

Yea it doesn’t seem to work the same way as FLAGS. When someone flags a post we get an email sent to the moderators if the flag isn’t dealt with.

So when a moderation post is required its not sending the email or alerting moderators like a flag does.


(Jeff Atwood) #12

@neil I thought we had reminders for pending moderation posts? I know I have gotten them before on discourse.codinghorror.com


(Neil Lalonde) #13

Here’s what we send reminders for:

Pending Users Reminder: if must approve users and pending_users_reminder_delay > 0 and there are new users who need to be approved older than the delay, then send a message to moderators.

Pending Queued Post Reminder: if notify about queued posts after > 0, contact_email is set, and there are posts that need to be approved (they aren’t publicly visible yet), then email the contact email.

So I’m guessing that this plugin doesn’t use the must approve users or approve post count settings. It will need to implement its own reminder.


(Leo Davidson) #14

The plugin only augments DiscourseForceModeration with an extra check, in addition to the ones Discourse does by default.

I’m assuming anything the plugin causes to go through moderation will be affected by the notify about queued posts after setting, if that setting applies to other posts which DiscourseForceModeration flags for moderation, but haven’t verified that myself.


#15

Any update here? This force moderation is a great idea for a few rogue users we just need a way to be alerted.

-Joe


#16

@neil can you help here? It seems theres a bug here… the developer says its working right and Discourse isn’t picking up the flag.


(Leo Davidson) #17

I left a couple of messages pending moderation after the plugin flagged them, and after about 24 hours Discourse emailed me to say there were messages pending moderation.

So it does seem to work, and may be a configuration issue with your forum. e.g. Who is set to be emailed and after how much time.


#18

Yea I am not getting any alerts of flags for moderation posts. IT works (albeit longer than the 1 hour time limit) for normally flagged posts but the moderation flags do not alert at all.


(Leo Davidson) #19

v0.2 of the Force Moderation plugin is now in GitHub. The update fixes the plugin for Discourse v1.9.0.beta7 and above.

If you update Discourse, be sure to update the plugin at the same time, and vice versa.

(Nothing bad should happen if one is updated & not the other, except that the plugin won’t have any effect and people you want to be moderated will be able to post normally.)