mirror of https://github.com/zulip/zulip.git
org_settings: Disable `Deactivate` button for yourself in Users tab.
This disables the Deactivate button for the current user in the Users tab, so that it becomes hard to deactivae yourself accidently from Users tab. Fixes #10427.
This commit is contained in:
parent
8b76a55b16
commit
9037ef56dc
|
@ -169,8 +169,11 @@ function populate_users(realm_people_data) {
|
|||
activity_rendered = $("<span></span>").text(i18n.t("Unknown"));
|
||||
}
|
||||
|
||||
var $row = $(templates.render("admin_user_list", {user: item, can_modify: page_params.is_admin}));
|
||||
|
||||
var $row = $(templates.render("admin_user_list", {
|
||||
user: item,
|
||||
can_modify: page_params.is_admin,
|
||||
is_current_user: people.is_my_user_id(item.user_id),
|
||||
}));
|
||||
$row.find(".last_active").append(activity_rendered);
|
||||
|
||||
return $row;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<td>
|
||||
<span class="user-status-settings">
|
||||
{{#if is_active}}
|
||||
<button class="button rounded small deactivate btn-danger">
|
||||
<button class="button rounded small deactivate btn-danger" {{#if ../is_current_user}}disabled="disabled"{{/if}}>
|
||||
{{t "Deactivate" }}
|
||||
</button>
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue