Skip to content

Commit

Permalink
Give read access on motebehov to DVH except two columns (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
geir-waagboe authored Jan 23, 2024
1 parent ab0f1ba commit 91387bc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
REVOKE ALL ON ALL TABLES IN SCHEMA public FROM cloudsqliamuser;
REVOKE ALL ON ALL TABLES IN SCHEMA public FROM "[email protected]";
REVOKE ALL ON ALL TABLES IN SCHEMA public FROM "[email protected]";

GRANT SELECT ON ALL TABLES IN SCHEMA public TO cloudsqliamuser;

GRANT SELECT ON MOTEBEHOV_DVH TO "[email protected]";
25 changes: 25 additions & 0 deletions src/main/resources/db/migration/V1_9__view_dvh.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
CREATE VIEW MOTEBEHOV_DVH (
motebehov_uuid,
opprettet_dato,
opprettet_av,
virksomhetsnummer,
har_motebehov,
tildelt_enhet,
behandlet_tidspunkt,
behandlet_veileder_ident,
skjematype,
sm_fnr,
opprettet_av_fnr
) AS SELECT
motebehov_uuid,
opprettet_dato,
opprettet_av,
virksomhetsnummer,
har_motebehov,
tildelt_enhet,
behandlet_tidspunkt,
behandlet_veileder_ident,
skjematype,
sm_fnr,
opprettet_av_fnr
FROM MOTEBEHOV;

0 comments on commit 91387bc

Please sign in to comment.