mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-09 01:53:19 +08:00
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:
parent
a38f3dcec3
commit
0ffc48b43a
2 changed files with 11 additions and 2 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue