From f39f906fa5fffdc826003c34005aeab3aa5c7073 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 21 Apr 2026 22:19:50 +0200 Subject: [PATCH] fix(admin): restore SSO settings loading on admin panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- public/js/admin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/admin.js b/public/js/admin.js index 7b60e69..2c0382f 100644 --- a/public/js/admin.js +++ b/public/js/admin.js @@ -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; } } });