Can recover deleted topics. Deleted topics show the first post as deleted in the UI.

This commit is contained in:
Robin Ward
2013-07-12 12:08:23 -04:00
parent f05bc44fbe
commit 6ca5df0a09
16 changed files with 167 additions and 31 deletions

View File

@ -39,8 +39,8 @@ class PostSerializer < BasicPostSerializer
:draft_sequence,
:hidden,
:hidden_reason_id,
:deleted_at,
:trust_level,
:deleted_at,
:deleted_by

View File

@ -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)