mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
message_edit: Remove get_editability function.
This commit removes get_editability function and we can instead use is_content_editable and is_topic_editable/can_move_message functions to check the permissions. We can remove get_editability since there is no longer a sort order to the possibilities and it is not necessary that if a user has permission to edit content then they can edit the topics also. So, this commit adds is_message_editable_ignoring_permissions check to is_content_editable and also modifies the tests accordingly.
This commit is contained in:
@@ -142,10 +142,7 @@ function message_hover($message_row) {
|
||||
}
|
||||
|
||||
// But the message edit hover icon is determined by whether the message is still editable
|
||||
const editability = message_edit.get_editability(message);
|
||||
const is_content_editable =
|
||||
editability === message_edit.editability_types.FULL ||
|
||||
editability === message_edit.editability_types.CONTENT_ONLY;
|
||||
const is_content_editable = message_edit.is_content_editable(message);
|
||||
|
||||
const can_move_message = message_edit.can_move_message(message);
|
||||
const args = {
|
||||
|
||||
Reference in New Issue
Block a user