Mercurial > gemma
comparison schema/auth.sql @ 172:a422471db08a
Automate running DB-tests with an extra database
run_tests.sh allows to run database tests easily without
affecting other existing databases and on a clean basis.
Because roles are cluster-wide, they cannot be easily droped
and recreated without affecting other databases. Thus,
moved their creation to roles.sql and in passing removed
unnecessary role 'gemma'.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 12 Jul 2018 16:30:01 +0200 |
parents | d349db18bece |
children | 3f7053e53fa6 |
comparison
equal
deleted
inserted
replaced
171:61f6c0add246 | 172:a422471db08a |
---|---|
5 -- | 5 -- |
6 SET search_path TO public, gemma, gemma_waterway, gemma_fairway; | 6 SET search_path TO public, gemma, gemma_waterway, gemma_fairway; |
7 | 7 |
8 -- We do not want any users to be able to create any objects | 8 -- We do not want any users to be able to create any objects |
9 REVOKE CREATE ON SCHEMA public FROM PUBLIC; | 9 REVOKE CREATE ON SCHEMA public FROM PUBLIC; |
10 | |
11 -- | |
12 -- Primary GEMMA roles (SRS table 3) | |
13 -- | |
14 CREATE ROLE waterway_user; | |
15 CREATE ROLE waterway_admin IN ROLE waterway_user; | |
16 CREATE ROLE sys_admin CREATEROLE BYPASSRLS IN ROLE waterway_admin; | |
17 | 10 |
18 -- | 11 -- |
19 -- Privileges for waterway_user | 12 -- Privileges for waterway_user |
20 -- | 13 -- |
21 GRANT USAGE ON SCHEMA gemma, gemma_waterway, gemma_fairway TO waterway_user; | 14 GRANT USAGE ON SCHEMA gemma, gemma_waterway, gemma_fairway TO waterway_user; |