Hiding scene photos and trailers from guests.

This commit is contained in:
DebaucheryLibrarian
2021-05-15 02:51:52 +02:00
parent 83ed793e39
commit 846b860c06
4 changed files with 60 additions and 4 deletions

View File

@@ -1574,6 +1574,12 @@ exports.up = knex => Promise.resolve()
CREATE POLICY notifications_policy_update ON notifications FOR UPDATE USING (notifications.user_id = current_user_id());
CREATE POLICY notifications_policy_delete ON notifications FOR DELETE USING (notifications.user_id = current_user_id());
CREATE POLICY notifications_policy_insert ON notifications FOR INSERT WITH CHECK (true);
ALTER TABLE releases_photos ENABLE ROW LEVEL SECURITY;
CREATE POLICY releases_photos_select ON releases_photos FOR SELECT USING (current_user_id() IS NOT NULL);
ALTER TABLE releases_trailers ENABLE ROW LEVEL SECURITY;
CREATE POLICY releases_trailers_select ON releases_trailers FOR SELECT USING (current_user_id() IS NOT NULL);
`, {
visitor: knex.raw(config.database.query.user),
});