-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust grants after migration and give read access to DVH (#290)
- Loading branch information
1 parent
bca9229
commit 00efc3f
Showing
3 changed files
with
19 additions
and
23 deletions.
There are no files selected for viewing
24 changes: 1 addition & 23 deletions
24
src/main/resources/db/migration/R__grant_to_cloudsqliamuser.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
REVOKE ALL ON ALL TABLES IN SCHEMA public FROM cloudsqliamuser; | ||
|
||
-- GRANT SELECT ON ALL TABLES IN SCHEMA public TO cloudsqliamuser; | ||
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO cloudsqliamuser; | ||
GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO cloudsqliamuser; | ||
|
||
DO $$ | ||
BEGIN | ||
CREATE ROLE cloudsqlsuperuser WITH NOLOGIN; | ||
EXCEPTION WHEN DUPLICATE_OBJECT THEN | ||
RAISE NOTICE 'not creating role cloudsqlsuperuser -- it already exists'; | ||
END | ||
$$; | ||
|
||
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA public TO cloudsqlsuperuser; | ||
GRANT USAGE ON ALL SEQUENCES IN SCHEMA public TO cloudsqlsuperuser; | ||
|
||
DO $$ | ||
BEGIN | ||
CREATE USER "esyfo-analyse"; | ||
EXCEPTION WHEN DUPLICATE_OBJECT THEN | ||
RAISE NOTICE 'not creating role esyfo-analyse -- it already exists'; | ||
END | ||
$$; | ||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO "esyfo-analyse"; | ||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO cloudsqliamuser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DO $$ | ||
BEGIN | ||
CREATE USER "[email protected]"; | ||
EXCEPTION WHEN DUPLICATE_OBJECT THEN | ||
RAISE NOTICE 'not creating user disykefravar -- it already exists'; | ||
END | ||
$$; | ||
|
||
GRANT SELECT ON motebehov to "[email protected]"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DO $$ | ||
BEGIN | ||
CREATE USER "esyfo-analyse"; | ||
EXCEPTION WHEN DUPLICATE_OBJECT THEN | ||
RAISE NOTICE 'not creating role esyfo-analyse -- it already exists'; | ||
END | ||
$$; | ||
|
||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO "esyfo-analyse"; |