|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<main class="container">
|
|
|
|
|
<div id="users-block" class="my-3 p-3 bg-white rounded shadow">
|
|
|
|
|
<h6 class="border-bottom pb-2 mb-0">Registered Users</h6>
|
|
|
|
|
<h6 class="border-bottom pb-2 mb-0">Registered Users {{urlpath}}</h6>
|
|
|
|
|
|
|
|
|
|
<div id="users-list">
|
|
|
|
|
{{#each users}}
|
|
|
|
@ -19,7 +19,7 @@
|
|
|
|
|
<span class="d-block">{{Email}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col">
|
|
|
|
|
<strong> Organizations:</strong>
|
|
|
|
|
<strong> Organizations: </strong>
|
|
|
|
|
<span class="d-block">
|
|
|
|
|
{{#each Organizations}}
|
|
|
|
|
<span class="badge badge-primary" data-orgtype="{{Type}}">{{Name}}</span>
|
|
|
|
@ -225,7 +225,7 @@
|
|
|
|
|
var input_mail = prompt("To delete user '" + mail + "', please type the email below")
|
|
|
|
|
if (input_mail != null) {
|
|
|
|
|
if (input_mail == mail) {
|
|
|
|
|
_post("admin/users/" + id + "/delete",
|
|
|
|
|
_post("{{urlpath}}/admin/users/" + id + "/delete",
|
|
|
|
|
"User deleted correctly",
|
|
|
|
|
"Error deleting user");
|
|
|
|
|
} else {
|
|
|
|
@ -235,19 +235,19 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
function remove2fa(id) {
|
|
|
|
|
_post("admin/users/" + id + "/remove-2fa",
|
|
|
|
|
_post("{{urlpath}}/admin/users/" + id + "/remove-2fa",
|
|
|
|
|
"2FA removed correctly",
|
|
|
|
|
"Error removing 2FA");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
function deauthUser(id) {
|
|
|
|
|
_post("admin/users/" + id + "/deauth",
|
|
|
|
|
_post("{{urlpath}}/admin/users/" + id + "/deauth",
|
|
|
|
|
"Sessions deauthorized correctly",
|
|
|
|
|
"Error deauthorizing sessions");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
function updateRevisions() {
|
|
|
|
|
_post("admin/users/update_revision",
|
|
|
|
|
_post("{{urlpath}}/admin/users/update_revision",
|
|
|
|
|
"Success, clients will sync next time they connect",
|
|
|
|
|
"Error forcing clients to sync");
|
|
|
|
|
return false;
|
|
|
|
@ -256,7 +256,7 @@
|
|
|
|
|
inv = document.getElementById("email-invite");
|
|
|
|
|
data = JSON.stringify({ "email": inv.value });
|
|
|
|
|
inv.value = "";
|
|
|
|
|
_post("admin/invite/", "User invited correctly",
|
|
|
|
|
_post("{{urlpath}}/admin/invite/", "User invited correctly",
|
|
|
|
|
"Error inviting user", data);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -278,7 +278,7 @@
|
|
|
|
|
}
|
|
|
|
|
function saveConfig() {
|
|
|
|
|
data = JSON.stringify(getFormData());
|
|
|
|
|
_post("admin/config/", "Config saved correctly",
|
|
|
|
|
_post("{{urlpath}}/admin/config/", "Config saved correctly",
|
|
|
|
|
"Error saving config", data);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
@ -286,7 +286,7 @@
|
|
|
|
|
var input = prompt("This will remove all user configurations, and restore the defaults and the " +
|
|
|
|
|
"values set by the environment. This operation could be dangerous. Type 'DELETE' to proceed:");
|
|
|
|
|
if (input === "DELETE") {
|
|
|
|
|
_post("admin/config/delete",
|
|
|
|
|
_post("{{urlpath}}/admin/config/delete",
|
|
|
|
|
"Config deleted correctly",
|
|
|
|
|
"Error deleting config");
|
|
|
|
|
} else {
|
|
|
|
@ -296,7 +296,7 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
function backupDatabase() {
|
|
|
|
|
_post("admin/config/backup_db",
|
|
|
|
|
_post("{{urlpath}}/admin/config/backup_db",
|
|
|
|
|
"Backup created successfully",
|
|
|
|
|
"Error creating backup");
|
|
|
|
|
return false;
|
|
|
|
|