Hotfix
Team Management 500 Error Resolved
Fixed a critical issue where the Team Management page returned a 500 error with "infinite recursion detected in policy for relation tenant_members".
Root Cause: The v0.16.13 RLS policy queried tenant_members from within a tenant_members policy, causing PostgreSQL to detect infinite recursion.
Fix: Replaced the recursive policy with the standard pattern using get_auth_tenant_id(), which reads tenant context from the JWT and bypasses RLS on internal queries.
Changes
- Replaced recursive
tenant_members_tenant_isolationpolicy with JWT-based check - Removed UPDATE/INSERT policies (handled by service role with proper authorization)
- Kept fallback policy for onboarding edge cases