mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Can recover deleted topics. Deleted topics show the first post as deleted in the UI.
This commit is contained in:
parent
f05bc44fbe
commit
6ca5df0a09
16 changed files with 167 additions and 31 deletions
|
@ -282,6 +282,10 @@ class Guardian
|
|||
is_staff?
|
||||
end
|
||||
|
||||
def can_recover_topic?(topic)
|
||||
is_staff?
|
||||
end
|
||||
|
||||
def can_delete_category?(category)
|
||||
is_staff? && category.topic_count == 0
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue