mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
message_move: Disable stream select dropdown for unprivileged users.
This commit disables the stream-select dropdown in the "Move message" modal if the user is not allowed to move messages between streams, and adds a tooltip for clarification when the dropdown is disabled. Fixes #28345.
This commit is contained in:
@@ -520,4 +520,21 @@ export function initialize(): void {
|
||||
placement: "bottom",
|
||||
appendTo: () => document.body,
|
||||
});
|
||||
|
||||
delegate("body", {
|
||||
target: "#move_topic_to_stream_widget_wrapper",
|
||||
onShow(instance) {
|
||||
if ($("#move_topic_to_stream_widget").prop("disabled")) {
|
||||
instance.setContent(
|
||||
$t({
|
||||
defaultMessage:
|
||||
"You do not have permission to move messages to another stream in this organization.",
|
||||
}),
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
appendTo: () => document.body,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user