Skip to content

Commit

Permalink
Enable SELECT command for the reviews table
Browse files Browse the repository at this point in the history
  • Loading branch information
Kgitman committed Jan 29, 2025
1 parent b12ddff commit 26b35db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion supabase/migrations/20241004043333_rls_policies.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,9 @@ WITH CHECK (user_id IS NOT NULL);
CREATE POLICY "Users can only update their own data"
ON reviews
FOR UPDATE
USING (user_id = reviews.user_id);
USING (user_id = reviews.user_id);

CREATE POLICY "Allow select rating"
ON reviews
FOR SELECT
USING (auth.role() = 'anon');

0 comments on commit 26b35db

Please sign in to comment.