Improved alert notifications.
This commit is contained in:
@@ -1567,6 +1567,13 @@ exports.up = knex => Promise.resolve()
|
||||
WHERE alerts.id = alerts_stashes.alert_id
|
||||
AND alerts.user_id = current_user_id()
|
||||
));
|
||||
|
||||
ALTER TABLE notifications ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
CREATE POLICY notifications_policy_select ON notifications FOR SELECT USING (notifications.user_id = current_user_id());
|
||||
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);
|
||||
`, {
|
||||
visitor: knex.raw(config.database.query.user),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user