-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpei_99_grant.sql
80 lines (51 loc) · 3.45 KB
/
pei_99_grant.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
69
70
71
72
73
74
75
76
77
78
79
/*PEI V1.0*/
/*Creation des droits sur l'ensemble des objets */
/* pei_99_grant.sql */
/*PostGIS*/
/* Propriétaire : GeoCompiegnois - http://geo.compiegnois.fr/ */
/* Auteur : FLorent Vanhoutte */
/* Participant : Grégory Bodet */
-- ICI SONT PRESENTES LES DROITS DE MANIERES GENERIQUES COMME ILS DOIVENT ETRE INTEGRES POUR CHAQUE CLASSE D'OBJETS. SI DES PARTICULARITES SONT
-- INTRODUITES ELLES SONT DETAILLEES CI-DESSOUS
-- ####################################################################################################################################################
-- ### ###
-- ### GRANT ###
-- ### ###
-- ####################################################################################################################################################
-- #################################################################### SEQUENCE ####################################################################
ALTER SEQUENCE [schema].[sequence]
OWNER TO create_sig;
GRANT ALL ON SEQUENCE [schema].[sequence] TO create_sig;
-- #################################################################### DOMAINE DE VALEUR ####################################################################
ALTER TABLE [schema].[table]
OWNER to create_sig;
GRANT ALL ON TABLE [schema].[table] TO sig_create;
GRANT SELECT ON TABLE [schema].[table] TO sig_read;
GRANT ALL ON TABLE [schema].[table] TO create_sig;
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE [schema].[table] TO sig_edit;
-- #################################################################### CLASSE D'OBJET ####################################################################
ALTER TABLE [schema].[table]
OWNER to create_sig;
GRANT ALL ON TABLE [schema].[table] TO sig_create;
GRANT SELECT ON TABLE [schema].[table] TO sig_read;
GRANT ALL ON TABLE [schema].[table] TO create_sig;
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE [schema].[table] TO sig_edit;
-- ########################################################### FONCTION ####################################################################
ALTER FUNCTION [schema].[fonction]()
OWNER TO create_sig;
GRANT EXECUTE ON FUNCTION [schema].[fonction]() TO PUBLIC;
GRANT EXECUTE ON FUNCTION [schema].[fonction]() TO create_sig;
-- ########################################################### VUE DE GESTION ####################################################################
ALTER TABLE [schema].[vue]
OWNER TO create_sig;
GRANT ALL ON TABLE [schema].[vue] TO sig_create;
GRANT SELECT ON TABLE [schema].[vue] TO sig_read;
GRANT ALL ON TABLE [schema].[vue] TO create_sig;
GRANT INSERT, SELECT, UPDATE, DELETE ON TABLE [schema].[vue] TO sig_edit;
-- ########################################################### VUE APPLICATIVE ou OPEN DATA ####################################################################
ALTER TABLE [schema].[vue]
OWNER TO create_sig;
GRANT SELECT ON TABLE [schema].[vue] TO sig_create;
GRANT SELECT ON TABLE [schema].[vue] TO sig_read;
GRANT SELECT ON TABLE [schema].[vue] TO sig_edit;
GRANT SELECT ON TABLE [schema].[vue] TO create_sig;