From 0ffc48b43a98955ccfeff72af2332a0174b8abb5 Mon Sep 17 00:00:00 2001 From: oliver Date: Tue, 8 Sep 2026 11:38:46 +0800 Subject: [PATCH] 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 --- lib/client.js | 11 ++++++++++- package.json | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index 2e233c6..b7d463d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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' diff --git a/package.json b/package.json index e47a203..918dba0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "dsh-ops-cron", "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, "type": "module", "repository": {