mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Don't allow users to edit topic information when the OP is locked
see: https://meta.discourse.org/t/user-able-to-edit-title-of-locked-post/104826
This commit is contained in:
@@ -97,7 +97,9 @@ module TopicGuardian
|
||||
)
|
||||
|
||||
return false if topic.archived
|
||||
is_my_own?(topic) && !topic.edit_time_limit_expired?
|
||||
is_my_own?(topic) &&
|
||||
!topic.edit_time_limit_expired? &&
|
||||
!Post.where(topic_id: topic.id, post_number: 1).where.not(locked_by_id: nil).exists?
|
||||
end
|
||||
|
||||
# Recovery Method
|
||||
|
||||
Reference in New Issue
Block a user