Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

wip: fine grain lists permission #223

Duncan Healyd0474c69e640
diff --git a/examples/todo/db/task_list_schema.sql b/examples/todo/db/task_list_schema.sql
index 9d4b35b8ebd..ed614236c05 100644
--- a/examples/todo/db/task_list_schema.sql
+++ b/examples/todo/db/task_list_schema.sql
@@ -45,7 +45,9 @@ CREATE POLICY "Allow individual select access" on userlists FOR SELECT USING ( a
CREATE POLICY "Allow individual insert access" on userlists FOR INSERT WITH CHECK ( auth.uid() = users_id );
CREATE POLICY "Allow individual update access" on userlists FOR UPDATE USING ( auth.uid() = users_id );
-CREATE POLICY "Allow logged-in full access" on lists FOR ALL USING ( auth.role() = 'authenticated' );
+CREATE POLICY "Allow logged-in full access" on lists FOR SELECT USING ( auth.role() = 'authenticated' );
+CREATE POLICY "Allow individual insert access" on lists FOR INSERT WITH CHECK ( auth.role() = 'authenticated' );
+CREATE POLICY "Allow individual update access" on lists FOR UPDATE USING ( auth.role() = 'authenticated' );
-- user should see other tasks in lists they are a member of
-- todo