CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

fix(billing): quota exemption delegates to the canonical isSiteAdmin #5478

Merged⚡ AI-generatedXSccantynz wants to mergefix/quota-exemption-canonical-adminmainopened 22d ago
ccantynzcommented 22d ago

The first exemption (#5477) read users.is_admin — a second representation of adminness that the owner's account doesn't carry — so the owner hit the same 402 with the "fix" deployed. Adminness is decided by lib/admin.ts isSiteAdmin (the site_admins table + oldest-user bootstrap); the exemption now delegates there. Regression test pins the delegation and forbids the parallel users.isAdmin read. Two-sources-of-truth strikes again — never a parallel copy of an authorization decision.

🤖 Generated with Claude Code

gluecron[bot]🤖 botAI Reviewcommented 22d ago

AI review unavailable

The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.

ccantynzAI Reviewcommented 22d ago

AI Triage

(no summary)

Priority: medium Risk area: mixed

Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)

Suggestions only — nothing has been applied. The PR author stays in control.

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts