Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c7028b278
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ) | ||
| AND ( | ||
| "enforcing_2fa" IS NOT TRUE | ||
| OR "public"."has_2fa_enabled"((auth.uid())::uuid) |
There was a problem hiding this comment.
Use API-key-aware identity in 2FA policy check
The new WITH CHECK clause gates enforcing_2fa with has_2fa_enabled(auth.uid()), but API-key writes run as anon with a capgkey header (see supabase/functions/_backend/utils/supabase.ts), so auth.uid() is null in that path. This means valid admin API keys cannot set enforcing_2fa = true (and cannot keep enforcing_2fa = true while updating other org fields), which is a backward-incompatible regression for PUT /organization; the check should use the resolved key identity/user id rather than auth.uid().
Useful? React with 👍 / 👎.
|



Summary
Test plan
Screenshots
Checklist
bun run lint:backend && bun run lint.accordingly.
my tests