Disable user-visible UI for editing messages, for MIT.

This doesn't actually prevent a user from making the API call into our
servers to actually go and edit a message, so this isn't a bulletproof
solution for realms where messages ABSOLUTELY MUST NOT be edited.

(imported from commit 5bf043a201e2952189b45f93b8c5ca7648f6aee7)
This commit is contained in:
Waseem Daher
2013-11-30 13:03:12 -08:00
parent aeaac45fd0
commit ebfcdfd35e
5 changed files with 12 additions and 5 deletions

View File

@@ -552,6 +552,10 @@ function process_message_for_recent_subjects(message, remove_message) {
function set_topic_edit_properties(message) {
message.always_visible_topic_edit = false;
message.on_hover_topic_edit = false;
if (feature_flags.disable_message_editing) {
return;
}
// Messages with no topics should always have an edit icon visible
// to encourage updating them. Admins can also edit any topic.
if (message.subject === compose.empty_subject_placeholder()) {