Skip to content

docs: fix errors in multiple permissive policies example#150

Open
nielskaspers wants to merge 1 commit intosupabase:mainfrom
nielskaspers:fix/issue-44600-rls-docs-corrections
Open

docs: fix errors in multiple permissive policies example#150
nielskaspers wants to merge 1 commit intosupabase:mainfrom
nielskaspers:fix/issue-44600-rls-docs-corrections

Conversation

@nielskaspers
Copy link
Copy Markdown

Summary

Fix multiple documentation errors in the 0006 multiple permissive policies lint example that made the "How to Resolve" section incorrect and misleading.

Issue

Fixes supabase/supabase#44600

Changes

  • Fix typo: "departemnt" → "department"
  • Fix Policy B description: "at or above a certain grade level" → "at or below the querying user's grade level" to match the <= operator in the code
  • Align stated intention ("below") with the <= operator ("at or below")
  • Fix consolidated policy: change or to and so both conditions must be satisfied (matching the intended behavior)
  • Fix consolidated policy operator: >=<= to match the original Policy B
  • Add clarity: specify "regardless of grade level" and "regardless of department" to better explain the permissive OR behavior

Testing

  • Read through the corrected example to verify the text, code, and stated intention are all consistent
  • The consolidated policy now correctly requires both same-department AND at-or-below grade level, which matches the stated intention

- Fix typo: "departemnt" → "department"
- Fix Policy B description to match code: "at or above" → "at or below"
- Align stated intention with the <= operator in the code
- Fix consolidated policy: change OR to AND so both conditions must pass
- Fix consolidated policy operator: >= → <= to match original Policy B
- Add clarity to error explanation about cross-policy access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0006 multiple permissive policies - Increase clarity of example, correct final example code

1 participant