mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Trust level 4: add ability to edit any post and see edit history
This commit is contained in:
@@ -45,7 +45,8 @@ class PostSerializer < BasicPostSerializer
|
||||
:deleted_at,
|
||||
:deleted_by,
|
||||
:user_deleted,
|
||||
:edit_reason
|
||||
:edit_reason,
|
||||
:can_view_edit_history
|
||||
|
||||
|
||||
def moderator?
|
||||
@@ -200,6 +201,10 @@ class PostSerializer < BasicPostSerializer
|
||||
SiteSetting.enable_names?
|
||||
end
|
||||
|
||||
def can_view_edit_history
|
||||
scope.can_view_post_revisions?(object)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def post_actions
|
||||
|
||||
Reference in New Issue
Block a user