Add Users settings tab
This commit is contained in:
@@ -6051,9 +6051,18 @@ function initSettingsUI() {
|
||||
}
|
||||
async function refreshUserManagement() {
|
||||
const section = document.getElementById("user-management");
|
||||
if (!section) return;
|
||||
section.style.display = authEnabled && authRole === "admin" ? "block" : "none";
|
||||
if (section.style.display === "none") return;
|
||||
const tab = document.getElementById("settings-users-tab");
|
||||
if (!section || !tab) return;
|
||||
const canManageUsers = authEnabled && authRole === "admin";
|
||||
tab.style.display = canManageUsers ? "" : "none";
|
||||
if (!canManageUsers) {
|
||||
const panel = document.getElementById("subtab-settings-users");
|
||||
if (panel) panel.style.display = "none";
|
||||
if (tab.classList.contains("active")) {
|
||||
document.querySelector('[data-subtab="settings-scheduler"]')?.click();
|
||||
}
|
||||
return;
|
||||
}
|
||||
const list = requiredElement("user-list");
|
||||
try {
|
||||
const users = await listUsers();
|
||||
|
||||
Reference in New Issue
Block a user