mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-11 11:15:58 +03:00
support /users/<uuid>/invite/resend
admin api
This commit is contained in:
21
src/static/scripts/admin_users.js
vendored
21
src/static/scripts/admin_users.js
vendored
@@ -120,6 +120,24 @@ function inviteUser(event) {
|
||||
);
|
||||
}
|
||||
|
||||
function resendUserInvite (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const id = event.target.parentNode.dataset.vwUserUuid;
|
||||
const email = event.target.parentNode.dataset.vwUserEmail;
|
||||
if (!id) {
|
||||
alert("Required parameters not found!");
|
||||
return false;
|
||||
}
|
||||
const confirmed = confirm(`Are you sure you want to resend invitation for "${email}"?`);
|
||||
if (confirmed) {
|
||||
_post(`${BASE_URL}/admin/users/${id}/invite/resend`,
|
||||
"Invite sent successfully",
|
||||
"Error resend invite"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const ORG_TYPES = {
|
||||
"0": {
|
||||
"name": "Owner",
|
||||
@@ -228,6 +246,9 @@ function initUserTable() {
|
||||
document.querySelectorAll("button[vw-enable-user]").forEach(btn => {
|
||||
btn.addEventListener("click", enableUser);
|
||||
});
|
||||
document.querySelectorAll("button[vw-resend-user-invite]").forEach(btn => {
|
||||
btn.addEventListener("click", resendUserInvite);
|
||||
});
|
||||
|
||||
if (jdenticon) {
|
||||
jdenticon();
|
||||
|
Reference in New Issue
Block a user