mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 12:43:54 -06:00
Merge pull request #3239 from riking/edit-perms
FIX: TL3 could retitle restricted topics
This commit is contained in:
commit
5cab84b4b2
@ -28,6 +28,7 @@ module TopicGuardian
|
||||
# Editing Method
|
||||
def can_edit_topic?(topic)
|
||||
return false if Discourse.static_doc_topic_ids.include?(topic.id) && !is_admin?
|
||||
return false unless can_see?(topic)
|
||||
return true if is_staff? || (!topic.private_message? && user.has_trust_level?(TrustLevel[3]))
|
||||
return false if topic.archived
|
||||
is_my_own?(topic) && !topic.edit_time_limit_expired?
|
||||
|
Loading…
Reference in New Issue
Block a user