FEATURE: allow category group moderators to edit posts (#11005)

* FEATURE: allow category group moderators to edit posts

If the `enable_category_group_moderation` SiteSetting is enabled, posts should be editable by those belonging to the appropraite groups.
This commit is contained in:
jbrw
2020-10-23 12:37:44 -04:00
committed by GitHub
parent 8a3a6face5
commit ce76553010
3 changed files with 21 additions and 17 deletions

View File

@@ -131,7 +131,8 @@ module PostGuardian
(
SiteSetting.trusted_users_can_edit_others? &&
@user.has_trust_level?(TrustLevel[4])
)
) ||
is_category_group_moderator?(post.topic.category)
)
if post.topic&.archived? || post.user_deleted || post.deleted_at