fix(admin): restore SSO settings loading on admin panel

loadOidcConfig() was called from the first IIFE in admin.js but declared
in the second IIFE. Function declarations don't cross IIFE boundaries,
so the call threw ReferenceError and left the SSO form empty with
"Disabled" selected — even when SSO was configured and working. Moved
the call into the tabChanged handler of the IIFE where the function
lives.
This commit is contained in:
Daniel 2026-04-21 22:19:50 +02:00
parent d8504392a5
commit f39f906fa5

View file

@ -27,7 +27,7 @@
function loadAdmin() {
loadSettings();
loadUsers();
loadOidcConfig();
// loadOidcConfig() is registered in the CMS IIFE below — it's not in scope here
}
// ---- SETTINGS + STATS ----
@ -270,7 +270,7 @@
// Load CMS when admin tab is opened (via tabChanged event or click)
document.addEventListener('tabChanged', function(e) {
if (e.detail && e.detail.tab === 'admin') {
if (!cmsLoaded) { loadCms(); cmsLoaded = true; }
if (!cmsLoaded) { loadCms(); loadOidcConfig(); cmsLoaded = true; }
}
});