Moderator Extension

(Angus McLeod) #8

Great! The main thing this plugin needs to move forward is testing and input from someone who really needs it.

If you have the time, you could help me test it on my sandbox.

I’ve made two new categories:

If you could sign up two accounts on my sandbox, I’ll make each a category moderator in one of those categories, then flag and queue some posts in both with some dummy accounts.

5 Likes
(EW 👌) #9

I did installed your plugin and its work fine thank you for a great job :tada:

  1. When I visit the Settings/Groups and click on the Automatic tab, I could see that I have 19 site_moderators which is wrong. But when I click on site_moderators it’s showing the right number which is 2. I could replicate this every time I enter Automatic tab. ( I think something small need to be fixed)

  2. In the Category settings, to be able to assign a user to be a moderator for that category, he has to be granted Moderation in the Users settings. ( I don’t know if its required but this how its worked for me, otherwise I wasn’t able to select that user). But I’ve one case where I was able to give category moderation for a user without Grant Moderation! -for that I’m confused and I need your opinion & clarification on this, please.

1 Like
(Angus McLeod) #10

Yes, this sounds like a bug, I’ll take a look tomorrow.

Yes, this is how it’s meant to work.

Interesting! Could you give me some more details on this user (anything different about them?) and what exactly you did (i.e. step by step) to give them category moderation without site moderation.

Thanks!

(Heather Dudley) #11

Thanks, I’m going to take you up on that!

1 Like
(Angus McLeod) #12

We might hang ten on the testing for another day or so. :desert_island:

I did a deep dive on this plugin today and I’ve completely restructured it to make it more robust and extensible.

I haven’t entirely finished yet. I’ll follow up in the next day or so.

2 Likes
(Angus McLeod) #13

I’ve done a significant reworking of this plugin. I’ve changed it’s name to “Moderator Extension” to reflect a change of scope to include a variety of modifications to moderator functionality.

@hawk or @jomaxro could you update the topic title to “Moderator Extension”? Thanks.

https://github.com/angusmcleod/discourse-moderator-extension/commit/098adbba5159fe5ad47edc1ec0284a7768daaa42

The highlights of the changes are:

  • All moderator administration is now in /admin/users in a new “Moderation” section that appears if a user is a moderator. Like other settings in /admin/users, admins have read/write permissions and moderators have read permissions.

  • Moderators (currently) have two ‘types’: default and filtered. The key attributes of each of type is listed next to the ‘Type’ setting.

    • Default:

      • Standard Discourse moderator
    • Filtered:

      • Will only receive notifications and reminders about flags and queued posts for assigned categories.
      • Lists of flags and queued posts will be filtered by assigned categories.
      • Has all other powers of a standard Discourse moderator.
  • Moderators can now be assigned to multiple categories using the ‘Categories’ setting (see above screenshot). The significance of assignment to a category depends on the moderator type (see above descriptions).

  • When category assignments are filtering a moderator action list, like the flag lists, the filtering categories are listed.

  • As the description of the types states, all flag and queued post notifications and the reminder messages will reflect the moderator’s category assignments. This was true in the previous version, however this logic has been significantly upgraded to handle assignments to multiple categories.

  • You can now display a list of moderators assigned to a category above the topic list(s) for that category. There are both site-wide and category-specific settings for this.

    Screenshot%20at%20Mar%2002%2020-47-18

Additional features contemplated:

  • ‘Restricted’ Moderator Type. The deeper I got into this plugin, the more ambitious I got. A
    ‘restricted’ moderator type feels more doable now that I’ve laid some more of the groundwork. Something like:

    • Restricted (not currently implemented):

      • Will only receive notifications and reminders about flags and queued posts for assigned categories.
      • Lists of flags and queued posts will be filtered by assigned categories.
      • Powers concerning categories, topics, users and posts are restricted to assigned categories.

    The last item still contains a lot of work, i.e. most of the functionality described in “Authority” section of the Category Specific Moderators spec. I wouldn’t hold your breath for that spec to be fully implemented.

    Maybe there’s an interim type somewhere between ‘Filtered’ and ‘Restricted’.

  • Settings to control which admin routes are available to moderators

  • Category-specific moderator groups.

note: @ewanly (any existing moderator category assignments you made will be respected in the new system).

cc @Heather_Dudley

11 Likes
(Heather Dudley) #14

@angus This looks fantastic. I’m going to get on there today or this weekend and take a good, in-depth look.

(EW 👌) #17

I just had a chance to go through the changed plugin. Thank you @angus for all of your works and deep thoughts :angel:

In my use case, this will be the most important aspect and the main reason why I would use this plugin. I believe it will bring huge new use-cases to Discourse. I wish we could have it soonest :pray:

1 Like
(Diego Barreiro) #18

I think this plugin is broken
“IP Lookup” button doesn’t work, same as dropdown


With safe mode it was working


I’ve disabled it and waiting for Discourse to compile, but logs pointed to this plugin

3 Likes
(Diego Barreiro) #19

Confirmed: I removed the plugin and now works

It seems like the plugin breaks the admin profile of moderators

2 Likes
(Angus McLeod) #20

Thanks for the bug report. This is now fixed.

5 Likes
(Dakota) #21

Having a bit of an issue with this. When I go to a category that has this enabled and moderators added, the “Moderators” text and avatars don’t appear without a page refresh. After that, they persist when I visit the index, until I refresh again. I only have “display moderators” enabled for a single category.

Anyone else experienced this? Could it be caused by incompatibility with another plugin perhaps? I installed a few at once but don’t see any errors in the logs so I don’t have much to go on besides guessing and checking.

Edit: Enabled it for a bunch more categories (all those that have moderators), issue persists. Doesn’t have to do with that. The setting also stays until a page reload when I switch from a category with this enabled to one with it disabled. Some kind of caching issue?

1 Like
(Angus McLeod) #22

hm sounds like a property is not being properly observed. I’ll take a look at this tomorrow.

1 Like
(Angus McLeod) #23

@Flower_Child Upgrade the plugin and give it another go.

1 Like
(Dakota) #24

Looks like it’s partly fixed! The moderators now appear in categories without a page reload, but when returning to the index from a category, the moderators of the last category viewed still show up on the index for me.

My site uses category view on the index as the default tab, if that’s relevant.

1 Like
(Angus McLeod) #25

Yeah, I pushed a fix for it a little after the first fix. Are you running this commit?

(Dakota) #26

Yup, I even rebuilt the container to make sure I was fully updated and it still happens.

1 Like
(Angus McLeod) #27

Yup you were right, it’s because of that categories page :slight_smile:

This should do it:

3 Likes
(Dakota) #28

Ahah that fixed it. Thank you for all the help! :smile:

1 Like
(Heather Dudley) #29

@angus I’ve created that account (And posted in one of the mod categories) so can can find me easily.