What is the purpose of locking posts then? There is none. Or I have not found one, thus the feature is either obsolete, dysfunctional, or at least confusing.
The text clearly says “a staff member has locked this post from being edited”. If locking has a completely different purpose than protecting the post/topic OP from being edited this text should be changed.
Locked posts should NOT be editable by non-staff users, despite the setting that high trust level posters can edit posts (which we like in general, but not for locked posts of course).
As it seems from the code below “locking” a post currently means that ONLY the OP of the post can’t edit the post anymore. TL3, TL4 (and staff) are still able to edit a locked post (if enabled in the settings).
This is very much limiting the locking feature to an extremely limited use case.
How do I protect a very important official admin announcement from one rogue TL3 user to be changed into “This is a Micky Mouse post” and being tagged the wrong way and moved into a non-relevant category, but still want to have TL3/TL4 user have the ability to edit posts in general?
Locked should mean locked (e.g. uneditable) for all besides staff.
return false if Discourse.static_doc_topic_ids.include?(topic.id) && !is_admin?
return false unless can_see?(topic)
return true if is_admin?
return true if is_moderator? && can_create_post?(topic)
# can't edit topics in secured categories where you don't have permission to create topics
# except for a tiny edge case where the topic is uncategorized and you are trying
# to fix it but uncategorized is disabled
topic.category_id != SiteSetting.uncategorized_category_id
return false if !can_create_topic_on_category?(topic.category)
# TL4 users can edit archived topics, but can not edit private messages
return true if (
# TL3 users can not edit archived topics and private messages
return true if (
return false if topic.archived
**!Post.where(topic_id: topic.id, post_number: 1).where.not(locked_by_id: nil).exists?**