Allows mod posts to be created for category group moderators on closed/archived topics (#10399)

This commit is contained in:
jbrw
2020-08-10 15:21:01 -04:00
committed by GitHub
parent e3bc8f34ed
commit d67f7a7984
2 changed files with 34 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ module TopicGuardian
return false if topic.trashed?
return true if is_admin?
trusted = (authenticated? && user.has_trust_level?(TrustLevel[4])) || is_moderator?
trusted = (authenticated? && user.has_trust_level?(TrustLevel[4])) || is_moderator? || can_perform_action_available_to_group_moderators?(topic)
(!(topic.closed? || topic.archived?) || trusted) && can_create_post?(topic)
end