-
Notifications
You must be signed in to change notification settings - Fork 0
/
grants.tpl.sql
68 lines (43 loc) · 2.23 KB
/
grants.tpl.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
-- [SCHEMAS]
-- allow ods_admin to create new schemas (and objects within)
GRANT CREATE ON DATABASE "{{ ops-data-store-dev }}" TO ods_admin;
-- [CONTROLLED SCHEMA]
--
GRANT USAGE, CREATE ON SCHEMA controlled TO ods_admin;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA controlled TO ods_admin;
GRANT USAGE ON SCHEMA controlled TO ods_app_eo_acq_script;
GRANT USAGE ON SCHEMA controlled TO ods_write_fo;
GRANT SELECT ON ALL TABLES IN SCHEMA controlled TO ods_write_fo;
GRANT USAGE ON SCHEMA controlled TO ods_write_au;
GRANT SELECT ON ALL TABLES IN SCHEMA controlled TO ods_write_au;
GRANT USAGE ON SCHEMA controlled TO ods_read;
GRANT SELECT ON ALL TABLES IN SCHEMA controlled TO ods_read;
-- DEPOT
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.depot TO ods_write_fo;
-- INSTRUMENT
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.instrument TO ods_write_fo;
-- WAYPOINT
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.waypoint TO ods_write_au;
-- ROUTE CONTAINER
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.route_container TO ods_write_au;
-- ROUTE WAYPOINT
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.route_waypoint TO ods_write_au;
-- ROUTE
GRANT SELECT, INSERT, UPDATE, DELETE ON controlled.route TO ods_write_au;
-- EO ACQUISITION AOIs
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.eo_acq_aoi TO ods_admin;
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE controlled.eo_acq_aoi TO ods_write_fo;
GRANT SELECT ON TABLE controlled.eo_acq_aoi TO ods_app_eo_acq_script;
-- [PUBLIC]
--
-- LAYER STYLES
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.layer_styles TO ods_admin;
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.layer_styles TO ods_write_fo;
GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.layer_styles TO ods_write_au;
GRANT USAGE, SELECT ON SEQUENCE public.layer_styles_id_seq TO ods_admin;
GRANT USAGE, SELECT ON SEQUENCE public.layer_styles_id_seq TO ods_write_fo;
GRANT USAGE, SELECT ON SEQUENCE public.layer_styles_id_seq TO ods_write_au;
GRANT SELECT ON TABLE public.layer_styles TO ods_read;
-- [PLANNING FIELD OPS SCHEMA]
GRANT USAGE, CREATE ON SCHEMA planning_field_ops TO ods_admin;
GRANT USAGE, CREATE ON SCHEMA planning_field_ops TO ods_write_fo;