mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 11:47:15 +08:00
FEATURE - allow Group Moderators to edit category description (#10292)
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
This commit is contained in:
@ -192,8 +192,13 @@ class PostRevisor
|
||||
PostLocker.new(@post, @editor).lock
|
||||
end
|
||||
|
||||
# We log staff edits to posts
|
||||
if @editor.staff? && @editor.id != @post.user_id && @fields.has_key?('raw') && !@opts[:skip_staff_log]
|
||||
# We log staff/group moderator edits to posts
|
||||
if (
|
||||
(@editor.staff? || (@post.is_category_description? && Guardian.new(@editor).can_edit_category_description?(@post.topic.category))) &&
|
||||
@editor.id != @post.user_id &&
|
||||
@fields.has_key?('raw') &&
|
||||
!@opts[:skip_staff_log]
|
||||
)
|
||||
StaffActionLogger.new(@editor).log_post_edit(
|
||||
@post,
|
||||
old_raw: old_raw
|
||||
|
Reference in New Issue
Block a user