Category mods can't view full conversation in something else flags

I’m going to class this as a bug although I’m unsure if this is intended behaviour.

So currently category moderators can handle flags in their own category. However, it appears that when someone flags a post as ‘something else’ they can handle the flag but can’t view the full conversion even though the button is available it just says this page doesn’t exist or is private.


Repro (you need two accounts. User 2 is category mod)

  • User flags post as something else
  • User 2 goes to /review, reviews the flag but cannot view full conversation
4 Likes

Thanks for the bug report. I can confirm that I’ve been able to reproduce the problem.

When a post is flagged as ‘Something Else’ a private message topic is created between the user creating the flag and the group ‘moderators’. The ‘view full conversation’ button in your screenshot links to this private message topic, and if a category group moderator clicks on this presently they will receive an error.

The solution is to do something like the following near line 309 of post_action_creator.rb, which will add the relevant group to the private message if enabled, etc:

if SiteSetting.enable_category_group_moderation? && @post.topic&.category&.reviewable_by_group_id?
  create_args[:target_group_names] << @post.topic.category.reviewable_by_group.name
end

If that group has ‘Who can message this group?’ set to ‘Everyone’, the category group moderator will then be able to read these ‘Something Else’ reports.

If it is not set to ‘Everyone’, and error will be returned saying you can’t create the message when trying to create the flag.

There are two possible solutions that I can see:

  1. Require Category Group Moderator groups to have ‘Everyone’ for the messaging permission.
  2. Add an addition flag to the args in the above block of code called something like skip_group_validation that will skip the check on the messaging permissions when creating ‘Something Else’ flags.

Let me think that over and see what I can come up with…

4 Likes

A fix for the above issue has been merged in.

Thanks @ondrej!

5 Likes