Skip to content

Commit

Permalink
Merge pull request #286 from MORE-Platform/285-extend-db-view-for-dat…
Browse files Browse the repository at this point in the history
…a-gateway-with-participant_is_active-column

#285 Extend DB-View for Data-Gateway with "participant_is_active"-column
  • Loading branch information
ja-fra authored May 29, 2024
2 parents 17f1f41 + 2aeba3e commit 9416157
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- Update gateway-view to check the participant-state
CREATE OR REPLACE VIEW auth_routing_info (api_id, api_secret, study_id, participant_id, study_group_id, study_is_active, participant_is_active) AS
SELECT api_credentials.*, pt.study_group_id,
s.status IN ('active', 'preview'),
pt.status IN ('active')
FROM api_credentials
INNER JOIN participants pt
ON (api_credentials.study_id = pt.study_id and api_credentials.participant_id = pt.participant_id)
INNER JOIN studies s
ON (api_credentials.study_id = s.study_id)
;

0 comments on commit 9416157

Please sign in to comment.