FIX: use the 'post edit time limit' for topics too

This commit is contained in:
Régis Hanol
2015-02-25 20:53:21 +01:00
parent 005b8bf7c3
commit 1a070b16e4
5 changed files with 66 additions and 38 deletions

View File

@ -30,7 +30,7 @@ module TopicGuardian
return false if Discourse.static_doc_topic_ids.include?(topic.id) && !is_admin?
return true if is_staff? || (!topic.private_message? && user.has_trust_level?(TrustLevel[3]))
return false if topic.archived
is_my_own?(topic)
is_my_own?(topic) && !topic.edit_time_limit_expired?
end
# Recovery Method