mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-19 14:23: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
|
return null
|
||||||
}
|
}
|
||||||
function hasUdsLoginCookie() {
|
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'
|
const LOCALE_NS = 'settings.dshCronTasks'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "dsh-ops-cron",
|
"name": "dsh-ops-cron",
|
||||||
"description": "Scheduled tasks for DeepSeek Harness: Agent cron_* tools + sidebar 定时任务, with DSH or WhatsApp/IM delivery per job.",
|
"description": "Scheduled tasks for DeepSeek Harness: Agent cron_* tools + sidebar 定时任务, with DSH or WhatsApp/IM delivery per job.",
|
||||||
"version": "0.1.8",
|
"version": "0.1.9",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue