Files
omnivore/packages/db/migrations/0087.do.grant_delete_rls_on_user.sql
2022-07-13 16:06:40 +08:00

12 lines
251 B
PL/PgSQL
Executable File

-- Type: DO
-- Name: grant_delete_rls_on_users
-- Description: Add RLS delete permission to the users table
BEGIN;
CREATE POLICY delete_users on omnivore.user
FOR DELETE TO omnivore_user
USING (id = omnivore.get_current_user_id());
COMMIT;