Recognize fallback_admin login for the scheduled-tasks panel.

UDS_FALLBACK_USER is HttpOnly so the client never saw it; also accept UDS_FALLBACK_UI and data-uds-logged-in.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-08 11:38:46 +08:00
parent a38f3dcec3
commit 0ffc48b43a
2 changed files with 11 additions and 2 deletions

View file

@ -172,7 +172,16 @@ window.__ModuleLoader__.load({
return null
}
function hasUdsLoginCookie() {
return !!(readCookie('PORTALSSOUser') || readCookie('ZTEDPGSSOUser') || readCookie('UDS_FALLBACK_USER'))
// UDS_FALLBACK_USER is HttpOnly (invisible to document.cookie). Prefer the
// readable UDS_FALLBACK_UI cookie and uds-auth's /api/me-driven attr so
// fallback_admin sees the cron panel the same as super_admin.
return !!(
readCookie('PORTALSSOUser')
|| readCookie('ZTEDPGSSOUser')
|| readCookie('UDS_FALLBACK_UI')
|| readCookie('UDS_FALLBACK_USER')
|| document.documentElement.getAttribute('data-uds-logged-in') === '1'
)
}
const LOCALE_NS = 'settings.dshCronTasks'