mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 21:34:40 +08:00
Can recover deleted topics. Deleted topics show the first post as deleted in the UI.
This commit is contained in:
@ -39,8 +39,8 @@ class PostSerializer < BasicPostSerializer
|
||||
:draft_sequence,
|
||||
:hidden,
|
||||
:hidden_reason_id,
|
||||
:deleted_at,
|
||||
:trust_level,
|
||||
:deleted_at,
|
||||
:deleted_by
|
||||
|
||||
|
||||
|
@ -88,6 +88,7 @@ class TopicViewSerializer < ApplicationSerializer
|
||||
result[:can_move_posts] = true if scope.can_move_posts?(object.topic)
|
||||
result[:can_edit] = true if scope.can_edit?(object.topic)
|
||||
result[:can_delete] = true if scope.can_delete?(object.topic)
|
||||
result[:can_recover] = true if scope.can_recover_topic?(object.topic)
|
||||
result[:can_remove_allowed_users] = true if scope.can_remove_allowed_users?(object.topic)
|
||||
result[:can_invite_to] = true if scope.can_invite_to?(object.topic)
|
||||
result[:can_create_post] = true if scope.can_create?(Post, object.topic)
|
||||
|
Reference in New Issue
Block a user