alter read_labels policy to check user_id
This commit is contained in:
11
packages/db/migrations/0173.do.alter_labels_table_policy.sql
Executable file
11
packages/db/migrations/0173.do.alter_labels_table_policy.sql
Executable file
@ -0,0 +1,11 @@
|
||||
-- Type: DO
|
||||
-- Name: alter_labels_table_policy
|
||||
-- Description: Alter labels table select policy to check user_id
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER POLICY read_labels ON omnivore.labels
|
||||
TO omnivore_user
|
||||
USING (user_id = omnivore.get_current_user_id());
|
||||
|
||||
COMMIT;
|
||||
11
packages/db/migrations/0173.undo.alter_labels_table_policy.sql
Executable file
11
packages/db/migrations/0173.undo.alter_labels_table_policy.sql
Executable file
@ -0,0 +1,11 @@
|
||||
-- Type: UNDO
|
||||
-- Name: alter_labels_table_policy
|
||||
-- Description: Alter labels table select policy to check user_id
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER POLICY read_labels ON omnivore.labels
|
||||
TO omnivore_user
|
||||
USING (true);
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user