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": {