Files
omnivore/packages/db/migrations/0078.do.grant_update_rls_on_labels.sql
2022-03-30 12:11:25 -07:00

14 lines
312 B
PL/PgSQL
Executable File

-- Type: DO
-- Name: grant_update_rls_on_labels
-- Description: Add RLS update permission to the labels table
BEGIN;
CREATE POLICY update_labels on omnivore.labels
FOR UPDATE TO omnivore_user
USING (user_id = omnivore.get_current_user_id());
GRANT UPDATE ON omnivore.labels TO omnivore_user;
COMMIT;