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