FIX: staff should be able to edit topics that have been archived

This commit is contained in:
Neil Lalonde
2014-08-15 12:44:58 -04:00
parent f7b0c31418
commit 2f32af3941
2 changed files with 14 additions and 10 deletions

View File

@@ -27,10 +27,10 @@ module TopicGuardian
# Editing Method
def can_edit_topic?(topic)
return false if topic.archived
return true if is_my_own?(topic)
return false if Discourse.static_doc_topic_ids.include?(topic.id) && !is_admin?
is_staff? || user.has_trust_level?(:leader)
return true if is_staff? || user.has_trust_level?(:leader)
return false if topic.archived
is_my_own?(topic)
end
# Recovery Method