2021-03-11 05:43:45 +01:00
|
|
|
import $ from "jquery";
|
2023-10-03 02:10:04 +02:00
|
|
|
import {z} from "zod";
|
2021-03-11 05:43:45 +01:00
|
|
|
|
2021-06-21 11:11:30 +02:00
|
|
|
import render_settings_resend_invite_modal from "../templates/confirm_dialog/confirm_resend_invite.hbs";
|
2021-06-21 11:15:47 +02:00
|
|
|
import render_settings_revoke_invite_modal from "../templates/confirm_dialog/confirm_revoke_invite.hbs";
|
2021-04-22 18:34:53 +02:00
|
|
|
import render_admin_invites_list from "../templates/settings/admin_invites_list.hbs";
|
2021-02-28 01:22:20 +01:00
|
|
|
|
2021-03-16 23:38:59 +01:00
|
|
|
import * as blueslip from "./blueslip";
|
2021-02-28 01:22:20 +01:00
|
|
|
import * as channel from "./channel";
|
2021-05-26 09:37:20 +02:00
|
|
|
import * as confirm_dialog from "./confirm_dialog";
|
2021-04-13 06:51:54 +02:00
|
|
|
import {$t, $t_html} from "./i18n";
|
2021-02-28 01:22:20 +01:00
|
|
|
import * as ListWidget from "./list_widget";
|
|
|
|
import * as loading from "./loading";
|
|
|
|
import * as people from "./people";
|
|
|
|
import * as settings_config from "./settings_config";
|
2023-01-24 08:36:05 +01:00
|
|
|
import * as settings_data from "./settings_data";
|
2024-02-13 02:08:24 +01:00
|
|
|
import {current_user, realm} from "./state_data";
|
2021-02-28 01:22:20 +01:00
|
|
|
import * as timerender from "./timerender";
|
|
|
|
import * as ui_report from "./ui_report";
|
|
|
|
import * as util from "./util";
|
2020-07-24 06:02:07 +02:00
|
|
|
|
2023-10-16 06:38:15 +02:00
|
|
|
export const invite_schema = z.intersection(
|
2023-10-03 02:10:04 +02:00
|
|
|
z.object({
|
|
|
|
invited_by_user_id: z.number(),
|
|
|
|
invited: z.number(),
|
|
|
|
expiry_date: z.number().nullable(),
|
|
|
|
id: z.number(),
|
|
|
|
invited_as: z.number(),
|
|
|
|
}),
|
2024-02-09 21:29:42 +01:00
|
|
|
z.discriminatedUnion("is_multiuse", [
|
2023-10-03 02:10:04 +02:00
|
|
|
z.object({
|
|
|
|
is_multiuse: z.literal(false),
|
|
|
|
email: z.string(),
|
|
|
|
}),
|
|
|
|
z.object({
|
|
|
|
is_multiuse: z.literal(true),
|
|
|
|
link_url: z.string(),
|
|
|
|
}),
|
|
|
|
]),
|
|
|
|
);
|
|
|
|
type Invite = z.output<typeof invite_schema> & {
|
2024-05-16 05:05:29 +02:00
|
|
|
invited_as_text?: string | undefined;
|
2023-10-03 02:10:04 +02:00
|
|
|
invited_absolute_time?: string;
|
|
|
|
expiry_date_absolute_time?: string;
|
|
|
|
is_admin?: boolean;
|
|
|
|
disable_buttons?: boolean;
|
|
|
|
referrer_name?: string;
|
2024-04-20 14:43:02 +02:00
|
|
|
img_src?: string;
|
2023-10-03 02:10:04 +02:00
|
|
|
};
|
|
|
|
|
2019-11-02 00:06:25 +01:00
|
|
|
const meta = {
|
2017-10-21 03:15:12 +02:00
|
|
|
loaded: false,
|
|
|
|
};
|
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
export function reset(): void {
|
2017-10-21 03:15:12 +02:00
|
|
|
meta.loaded = false;
|
2021-02-28 01:22:20 +01:00
|
|
|
}
|
2017-10-21 03:15:12 +02:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function failed_listing_invites(xhr: JQuery.jqXHR): void {
|
2020-07-15 01:29:15 +02:00
|
|
|
loading.destroy_indicator($("#admin_page_invites_loading_indicator"));
|
2021-04-13 05:18:25 +02:00
|
|
|
ui_report.error(
|
|
|
|
$t_html({defaultMessage: "Error listing invites"}),
|
|
|
|
xhr,
|
|
|
|
$("#invites-field-status"),
|
|
|
|
);
|
2017-10-21 03:15:12 +02:00
|
|
|
}
|
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function add_invited_as_text(invites: Invite[]): void {
|
2020-02-09 05:08:58 +01:00
|
|
|
for (const data of invites) {
|
2020-06-23 15:32:18 +02:00
|
|
|
data.invited_as_text = settings_config.user_role_map.get(data.invited_as);
|
2020-02-09 05:08:58 +01:00
|
|
|
}
|
2019-01-03 16:59:21 +01:00
|
|
|
}
|
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function sort_invitee(a: Invite, b: Invite): number {
|
2020-04-11 20:06:01 +02:00
|
|
|
// multi-invite links don't have an email field,
|
|
|
|
// so we set them to empty strings to let them
|
|
|
|
// sort to the top
|
2023-10-03 02:10:04 +02:00
|
|
|
const str1 = a.is_multiuse ? "" : a.email.toUpperCase();
|
|
|
|
const str2 = b.is_multiuse ? "" : b.email.toUpperCase();
|
2020-04-11 20:06:01 +02:00
|
|
|
|
|
|
|
return util.strcmp(str1, str2);
|
|
|
|
}
|
2019-01-03 16:59:21 +01:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function populate_invites(invites_data: {invites: Invite[]}): void {
|
2017-10-21 03:15:12 +02:00
|
|
|
if (!meta.loaded) {
|
|
|
|
return;
|
|
|
|
}
|
2019-01-03 16:59:21 +01:00
|
|
|
|
|
|
|
add_invited_as_text(invites_data.invites);
|
|
|
|
|
2022-01-25 11:36:19 +01:00
|
|
|
const $invites_table = $("#admin_invites_table").expectOne();
|
|
|
|
ListWidget.create($invites_table, invites_data.invites, {
|
2020-07-15 01:29:15 +02:00
|
|
|
name: "admin_invites_list",
|
2023-05-01 13:44:40 +02:00
|
|
|
get_item: ListWidget.default_get_item,
|
2023-09-16 00:03:52 +02:00
|
|
|
modifier_html(item) {
|
2020-04-11 15:17:26 +02:00
|
|
|
item.invited_absolute_time = timerender.absolute_time(item.invited * 1000);
|
2021-12-01 12:10:58 +01:00
|
|
|
if (item.expiry_date !== null) {
|
|
|
|
item.expiry_date_absolute_time = timerender.absolute_time(item.expiry_date * 1000);
|
|
|
|
}
|
2024-02-13 02:08:16 +01:00
|
|
|
item.is_admin = current_user.is_admin;
|
2020-07-15 00:34:28 +02:00
|
|
|
item.disable_buttons =
|
|
|
|
item.invited_as === settings_config.user_role_values.owner.code &&
|
2024-02-13 02:08:16 +01:00
|
|
|
!current_user.is_owner;
|
2020-07-03 22:03:39 +02:00
|
|
|
item.referrer_name = people.get_by_user_id(item.invited_by_user_id).full_name;
|
2024-04-20 14:43:02 +02:00
|
|
|
item.img_src = people.small_avatar_url_for_person(
|
|
|
|
people.get_by_user_id(item.invited_by_user_id),
|
|
|
|
);
|
2020-07-16 22:40:18 +02:00
|
|
|
return render_admin_invites_list({invite: item});
|
2020-04-11 15:17:26 +02:00
|
|
|
},
|
|
|
|
filter: {
|
2023-10-03 02:10:04 +02:00
|
|
|
$element: $invites_table
|
|
|
|
.closest(".settings-section")
|
|
|
|
.find<HTMLInputElement>("input.search"),
|
2020-07-20 22:18:43 +02:00
|
|
|
predicate(item, value) {
|
2020-07-03 22:03:39 +02:00
|
|
|
const referrer = people.get_by_user_id(item.invited_by_user_id);
|
|
|
|
const referrer_email = referrer.email;
|
|
|
|
const referrer_name = referrer.full_name;
|
|
|
|
const referrer_name_matched = referrer_name.toLowerCase().includes(value);
|
2020-06-26 21:26:57 +02:00
|
|
|
const referrer_email_matched = referrer_email.toLowerCase().includes(value);
|
2020-04-11 15:17:26 +02:00
|
|
|
if (item.is_multiuse) {
|
2020-07-03 22:03:39 +02:00
|
|
|
return referrer_name_matched || referrer_email_matched;
|
2020-04-11 15:17:26 +02:00
|
|
|
}
|
|
|
|
const invitee_email_matched = item.email.toLowerCase().includes(value);
|
2020-07-03 22:03:39 +02:00
|
|
|
return referrer_email_matched || referrer_name_matched || invitee_email_matched;
|
2017-10-21 03:15:12 +02:00
|
|
|
},
|
2020-04-11 15:17:26 +02:00
|
|
|
},
|
2022-01-25 11:36:19 +01:00
|
|
|
$parent_container: $("#admin-invites-list").expectOne(),
|
2023-05-03 07:06:19 +02:00
|
|
|
init_sort: sort_invitee,
|
2020-04-11 16:23:29 +02:00
|
|
|
sort_fields: {
|
|
|
|
invitee: sort_invitee,
|
2024-04-20 20:19:01 +02:00
|
|
|
...ListWidget.generic_sort_functions("alphabetic", ["referrer_name"]),
|
2023-05-03 07:06:19 +02:00
|
|
|
...ListWidget.generic_sort_functions("numeric", [
|
|
|
|
"invited",
|
2024-02-23 12:22:48 +01:00
|
|
|
"expiry_date",
|
2023-05-03 07:06:19 +02:00
|
|
|
"invited_as",
|
|
|
|
]),
|
2020-04-11 16:23:29 +02:00
|
|
|
},
|
2022-01-25 11:36:19 +01:00
|
|
|
$simplebar_container: $("#admin-invites-list .progressive-table-wrapper"),
|
2020-04-11 15:17:26 +02:00
|
|
|
});
|
2019-08-22 07:34:19 +02:00
|
|
|
|
2020-07-15 01:29:15 +02:00
|
|
|
loading.destroy_indicator($("#admin_page_invites_loading_indicator"));
|
2017-10-21 03:15:12 +02:00
|
|
|
}
|
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function do_revoke_invite({
|
|
|
|
$row,
|
|
|
|
invite_id,
|
|
|
|
is_multiuse,
|
|
|
|
}: {
|
|
|
|
$row: JQuery;
|
|
|
|
invite_id: string;
|
|
|
|
is_multiuse: string;
|
|
|
|
}): void {
|
2021-07-05 12:41:37 +02:00
|
|
|
const modal_invite_id = $(".dialog_submit_button").attr("data-invite-id");
|
|
|
|
const modal_is_multiuse = $(".dialog_submit_button").attr("data-is-multiuse");
|
2023-10-03 02:15:07 +02:00
|
|
|
const $revoke_button = $row.find("button.revoke");
|
2019-02-15 23:12:41 +01:00
|
|
|
|
2023-10-03 02:15:07 +02:00
|
|
|
if (modal_invite_id !== invite_id || modal_is_multiuse !== is_multiuse) {
|
2019-02-15 23:12:41 +01:00
|
|
|
blueslip.error("Invite revoking canceled due to non-matching fields.");
|
2021-01-27 08:16:28 +01:00
|
|
|
ui_report.client_error(
|
2021-04-13 05:18:25 +02:00
|
|
|
$t_html({
|
|
|
|
defaultMessage: "Resending encountered an error. Please reload and try again.",
|
|
|
|
}),
|
2020-07-15 00:34:28 +02:00
|
|
|
$("#home-error"),
|
|
|
|
);
|
2019-02-15 23:12:41 +01:00
|
|
|
}
|
2021-05-26 09:37:20 +02:00
|
|
|
|
2022-01-25 11:36:19 +01:00
|
|
|
$revoke_button.prop("disabled", true).text($t({defaultMessage: "Working…"}));
|
2023-10-03 02:15:07 +02:00
|
|
|
let url = "/json/invites/" + invite_id;
|
2019-02-15 19:09:25 +01:00
|
|
|
|
|
|
|
if (modal_is_multiuse === "true") {
|
2023-10-03 02:15:07 +02:00
|
|
|
url = "/json/invites/multiuse/" + invite_id;
|
2019-02-15 19:09:25 +01:00
|
|
|
}
|
2023-10-03 02:10:04 +02:00
|
|
|
void channel.del({
|
2020-07-20 22:18:43 +02:00
|
|
|
url,
|
|
|
|
error(xhr) {
|
2022-01-25 11:36:19 +01:00
|
|
|
ui_report.generic_row_button_error(xhr, $revoke_button);
|
2019-02-15 23:12:41 +01:00
|
|
|
},
|
2020-07-20 22:18:43 +02:00
|
|
|
success() {
|
2023-10-03 02:15:07 +02:00
|
|
|
$row.remove();
|
2019-02-15 23:12:41 +01:00
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
2017-10-21 03:15:12 +02:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
function do_resend_invite({$row, invite_id}: {$row: JQuery; invite_id: string}): void {
|
2021-07-05 12:41:37 +02:00
|
|
|
const modal_invite_id = $(".dialog_submit_button").attr("data-invite-id");
|
2023-10-03 02:15:12 +02:00
|
|
|
const $resend_button = $row.find("button.resend");
|
2021-05-26 12:30:18 +02:00
|
|
|
|
2023-10-03 02:15:12 +02:00
|
|
|
if (modal_invite_id !== invite_id) {
|
2021-05-26 12:30:18 +02:00
|
|
|
blueslip.error("Invite resending canceled due to non-matching fields.");
|
|
|
|
ui_report.client_error(
|
|
|
|
$t_html({
|
|
|
|
defaultMessage: "Resending encountered an error. Please reload and try again.",
|
|
|
|
}),
|
|
|
|
$("#home-error"),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-01-25 11:36:19 +01:00
|
|
|
$resend_button.prop("disabled", true).text($t({defaultMessage: "Working…"}));
|
2023-10-03 02:10:04 +02:00
|
|
|
void channel.post({
|
2023-10-03 02:15:12 +02:00
|
|
|
url: "/json/invites/" + invite_id + "/resend",
|
2021-05-26 12:30:18 +02:00
|
|
|
error(xhr) {
|
2022-01-25 11:36:19 +01:00
|
|
|
ui_report.generic_row_button_error(xhr, $resend_button);
|
2021-05-26 12:30:18 +02:00
|
|
|
},
|
2024-05-01 06:27:32 +02:00
|
|
|
success() {
|
2022-01-25 11:36:19 +01:00
|
|
|
$resend_button.text($t({defaultMessage: "Sent!"}));
|
|
|
|
$resend_button.removeClass("resend btn-warning").addClass("sea-green");
|
2021-05-26 12:30:18 +02:00
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
export function set_up(initialize_event_handlers = true): void {
|
2017-10-21 03:15:12 +02:00
|
|
|
meta.loaded = true;
|
|
|
|
|
|
|
|
// create loading indicators
|
2020-07-15 01:29:15 +02:00
|
|
|
loading.make_indicator($("#admin_page_invites_loading_indicator"));
|
2017-10-21 03:15:12 +02:00
|
|
|
|
|
|
|
// Populate invites table
|
2023-10-03 02:10:04 +02:00
|
|
|
void channel.get({
|
2020-07-15 01:29:15 +02:00
|
|
|
url: "/json/invites",
|
2018-12-18 19:34:45 +01:00
|
|
|
timeout: 10 * 1000,
|
2023-10-03 02:10:04 +02:00
|
|
|
success(raw_data) {
|
|
|
|
const data = z.object({invites: z.array(invite_schema)}).parse(raw_data);
|
2021-02-28 01:22:20 +01:00
|
|
|
on_load_success(data, initialize_event_handlers);
|
2019-02-15 19:09:25 +01:00
|
|
|
},
|
2017-10-21 03:15:12 +02:00
|
|
|
error: failed_listing_invites,
|
|
|
|
});
|
2021-02-28 01:22:20 +01:00
|
|
|
}
|
2017-10-21 03:15:12 +02:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
export function on_load_success(
|
|
|
|
invites_data: {invites: Invite[]},
|
|
|
|
initialize_event_handlers: boolean,
|
|
|
|
): void {
|
2017-10-21 03:15:12 +02:00
|
|
|
meta.loaded = true;
|
|
|
|
populate_invites(invites_data);
|
2019-02-15 19:09:25 +01:00
|
|
|
if (!initialize_event_handlers) {
|
|
|
|
return;
|
|
|
|
}
|
2024-05-03 00:05:59 +02:00
|
|
|
$(".admin_invites_table").on("click", ".revoke", function (this: HTMLElement, e) {
|
2018-05-23 22:29:00 +02:00
|
|
|
// This click event must not get propagated to parent container otherwise the modal
|
2023-10-10 14:31:02 +02:00
|
|
|
// will not show up because of a call to `close_active` in `settings.js`.
|
2017-10-21 03:15:12 +02:00
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
2024-05-03 00:05:59 +02:00
|
|
|
const $row = $(this).closest(".invite_row");
|
2022-01-25 11:36:19 +01:00
|
|
|
const email = $row.find(".email").text();
|
|
|
|
const referred_by = $row.find(".referred_by").text();
|
2024-05-03 00:05:59 +02:00
|
|
|
const invite_id = $(this).attr("data-invite-id")!;
|
|
|
|
const is_multiuse = $(this).attr("data-is-multiuse")!;
|
2020-07-15 00:34:28 +02:00
|
|
|
const ctx = {
|
2023-10-03 02:15:07 +02:00
|
|
|
is_multiuse: is_multiuse === "true",
|
2020-07-20 22:18:43 +02:00
|
|
|
email,
|
|
|
|
referred_by,
|
2020-07-15 00:34:28 +02:00
|
|
|
};
|
2021-05-26 09:37:20 +02:00
|
|
|
const html_body = render_settings_revoke_invite_modal(ctx);
|
|
|
|
|
|
|
|
confirm_dialog.launch({
|
|
|
|
html_heading: ctx.is_multiuse
|
|
|
|
? $t_html({defaultMessage: "Revoke invitation link"})
|
|
|
|
: $t_html({defaultMessage: "Revoke invitation to {email}"}, {email}),
|
|
|
|
html_body,
|
2023-10-03 02:15:07 +02:00
|
|
|
on_click() {
|
|
|
|
do_revoke_invite({$row, invite_id, is_multiuse});
|
|
|
|
},
|
2021-05-26 09:37:20 +02:00
|
|
|
});
|
|
|
|
|
2023-10-03 02:15:07 +02:00
|
|
|
$(".dialog_submit_button").attr("data-invite-id", invite_id);
|
|
|
|
$(".dialog_submit_button").attr("data-is-multiuse", is_multiuse);
|
2017-10-21 03:15:12 +02:00
|
|
|
});
|
|
|
|
|
2024-05-03 00:05:59 +02:00
|
|
|
$(".admin_invites_table").on("click", ".resend", function (this: HTMLElement, e) {
|
2018-05-23 22:29:00 +02:00
|
|
|
// This click event must not get propagated to parent container otherwise the modal
|
2023-10-10 14:31:02 +02:00
|
|
|
// will not show up because of a call to `close_active` in `settings.js`.
|
2017-10-21 03:15:12 +02:00
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
|
|
|
|
2024-05-03 00:05:59 +02:00
|
|
|
const $row = $(this).closest(".invite_row");
|
2022-01-25 11:36:19 +01:00
|
|
|
const email = $row.find(".email").text();
|
2024-05-03 00:05:59 +02:00
|
|
|
const invite_id = $(this).attr("data-invite-id")!;
|
2021-05-26 12:30:18 +02:00
|
|
|
const html_body = render_settings_resend_invite_modal({email});
|
2017-10-21 03:15:12 +02:00
|
|
|
|
2021-05-26 12:30:18 +02:00
|
|
|
confirm_dialog.launch({
|
2024-02-08 11:47:45 +01:00
|
|
|
html_heading: $t_html({defaultMessage: "Resend invitation?"}),
|
2021-05-26 12:30:18 +02:00
|
|
|
html_body,
|
2023-10-03 02:15:12 +02:00
|
|
|
on_click() {
|
|
|
|
do_resend_invite({$row, invite_id});
|
|
|
|
},
|
2017-10-21 03:15:12 +02:00
|
|
|
});
|
2021-05-26 12:30:18 +02:00
|
|
|
|
2023-10-03 02:15:12 +02:00
|
|
|
$(".dialog_submit_button").attr("data-invite-id", invite_id);
|
2017-10-21 03:15:12 +02:00
|
|
|
});
|
2021-02-28 01:22:20 +01:00
|
|
|
}
|
2023-01-24 08:36:05 +01:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
export function update_invite_users_setting_tip(): void {
|
2024-02-13 02:08:16 +01:00
|
|
|
if (settings_data.user_can_invite_users_by_email() && !current_user.is_admin) {
|
2023-01-24 08:36:05 +01:00
|
|
|
$(".invite-user-settings-tip").hide();
|
|
|
|
return;
|
|
|
|
}
|
2023-06-26 23:38:08 +02:00
|
|
|
const permission_type = settings_config.email_invite_to_realm_policy_values;
|
2024-02-13 02:08:24 +01:00
|
|
|
const current_permission = realm.realm_invite_to_realm_policy;
|
2023-01-24 08:36:05 +01:00
|
|
|
let tip_text;
|
|
|
|
switch (current_permission) {
|
|
|
|
case permission_type.by_admins_only.code: {
|
|
|
|
tip_text = $t({
|
|
|
|
defaultMessage:
|
|
|
|
"This organization is configured so that admins can invite users to this organization.",
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case permission_type.by_moderators_only.code: {
|
|
|
|
tip_text = $t({
|
|
|
|
defaultMessage:
|
|
|
|
"This organization is configured so that admins and moderators can invite users to this organization.",
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case permission_type.by_members.code: {
|
|
|
|
tip_text = $t({
|
|
|
|
defaultMessage:
|
|
|
|
"This organization is configured so that admins, moderators and members can invite users to this organization.",
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case permission_type.by_full_members.code: {
|
|
|
|
tip_text = $t({
|
|
|
|
defaultMessage:
|
|
|
|
"This organization is configured so that admins, moderators and full members can invite users to this organization.",
|
|
|
|
});
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
tip_text = $t({
|
|
|
|
defaultMessage:
|
|
|
|
"This organization is configured so that nobody can invite users to this organization.",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$(".invite-user-settings-tip").show();
|
|
|
|
$(".invite-user-settings-tip").text(tip_text);
|
|
|
|
}
|
2023-06-13 09:47:53 +02:00
|
|
|
|
2023-10-03 02:10:04 +02:00
|
|
|
export function update_invite_user_panel(): void {
|
2023-06-13 09:47:53 +02:00
|
|
|
update_invite_users_setting_tip();
|
2023-08-03 16:06:40 +02:00
|
|
|
if (
|
|
|
|
!settings_data.user_can_invite_users_by_email() &&
|
|
|
|
!settings_data.user_can_create_multiuse_invite()
|
|
|
|
) {
|
2023-06-13 09:47:53 +02:00
|
|
|
$("#admin-invites-list .invite-user-link").hide();
|
|
|
|
} else {
|
|
|
|
$("#admin-invites-list .invite-user-link").show();
|
|
|
|
}
|
|
|
|
}
|