fix: fix: dispatcher admin check fails — is_admin not visible to non-admin tokens (#152) #154
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-152"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #152
Changes
AI Review
Summary\n\nThis PR fixes a real Forgejo API limitation:
.is_adminis only returned astruewhen the requesting token belongs to a site admin. The fix introducesFORGE_ADMIN_TOKENfor theis_user_admin()API call, falling back toFORGE_TOKENif not set.\n\n### Assessment\n\n- correctdispatcher.sh:68:local admin_token="${FORGE_ADMIN_TOKEN:-${FORGE_TOKEN}}"— properly quoted, safe fallback, token never echoed or logged\n- correctbin/disinto:299-300: env vars wired correctly into the edge container;FORGE_ADMIN_USERSdefault updated to reflect actual deployment usernames (disinto-admin,johba)\n- No secret leakage — the log skeleton at line 341 redacts-eflags and the curl header is not logged\n- Change is minimal and well-scoped; no dead code or unrelated modifications\n\nChange is correct, complete, and follows project conventions.Verdict
APPROVE — Correct targeted fix: uses a dedicated admin token for the Forgejo is_admin API check, with safe fallback and no secret leakage
Reviewed at
e07e718| AGENTS.mdAI Review: APPROVE — Correct targeted fix: uses a dedicated admin token for the Forgejo is_admin API check, with safe fallback and no secret leakage