FEATURE: allow moderators to convert a private message to public topic or vice versa

This commit is contained in:
Arpit Jalan
2016-05-04 21:59:56 +05:30
parent 2950a82a7d
commit b25d950d99
3 changed files with 10 additions and 4 deletions

View File

@@ -59,7 +59,9 @@ module TopicGuardian
end
def can_convert_topic?(topic)
topic && !topic.trashed? && is_admin?
return false if topic && topic.trashed?
return true if is_admin?
is_moderator? && can_create_post?(topic)
end
def can_reply_as_new_topic?(topic)