-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathqwc-services-unified-permissions.json
206 lines (206 loc) · 5.21 KB
/
qwc-services-unified-permissions.json
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/qwc-services/qwc-services-core/raw/master/schemas/qwc-services-unified-permissions.json",
"title": "QWC Services unified Permissions",
"description": "Unified and simplified permissions if resource permissions are identical in all QWC Services",
"type": "object",
"properties": {
"$schema": {
"title": "JSON Schema",
"description": "Reference to JSON schema of these permissions",
"type": "string",
"format": "uri",
"default": "https://github.com/qwc-services/qwc-services-core/raw/master/schemas/qwc-services-unified-permissions.json"
},
"users": {
"title": "Users",
"type": "array",
"items": {
"title": "User",
"type": "object",
"properties": {
"name": {
"description": "User name",
"type": "string"
},
"groups": {
"title": "Group memberships",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"roles": {
"title": "Role memberships",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"required": [
"name",
"groups"
]
}
},
"groups": {
"title": "Groups",
"type": "array",
"items": {
"title": "Group",
"type": "object",
"properties": {
"name": {
"description": "Group name",
"type": "string"
},
"roles": {
"title": "Role memberships",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
}
},
"required": [
"name",
"roles"
]
}
},
"roles": {
"title": "Roles",
"type": "array",
"items": {
"title": "Role",
"type": "object",
"properties": {
"role": {
"description": "Role name",
"type": "string"
},
"permissions": {
"title": "Permissions for role",
"type": "object",
"properties": {
"all_services": {
"description": "Permitted resources for all services (top-level permitted layers and group layers, datasets with write permissions, document templates). NOTE: Use resource name as property name for its permissions.",
"type": "object",
"additionalProperties": {
"description": "Resource permissions",
"type": "object",
"properties": {
"writable": {
"description": "Writable flag for datasets with write permissions",
"type": "boolean"
}
}
}
}
},
"required": [
"all_services"
]
}
},
"required": [
"role"
]
}
},
"wms_name": {
"description": "Name of WMS service and its root layer",
"type": "string"
},
"wfs_name": {
"description": "WFS service name",
"type": "string"
},
"dataproducts": {
"title": "Dataproducts",
"type": "array",
"items": {
"oneOf": [
{"$ref": "#/definitions/layer"},
{"$ref": "#/definitions/group_layer"}
]
}
},
"common_resources": {
"description": "Additional resources with no restrictions (internal print layers, background layers, print templates, default Solr facets)",
"type": "array",
"items": {
"description": "Resource name",
"type": "string"
}
}
},
"required": [
"users",
"groups",
"roles",
"wms_name",
"wfs_name",
"dataproducts",
"common_resources"
],
"definitions": {
"layer": {
"title": "Layer",
"description": "Single layer",
"type": "object",
"properties": {
"name": {
"description": "Layer name",
"type": "string"
},
"attributes": {
"description": "List of attributes, excluding 'geometry'",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"attributes"
],
"additionalProperties": false
},
"group_layer": {
"title": "Group Layer",
"description": "Group layer with sublayers",
"type": "object",
"properties": {
"name": {
"description": "Group layer name",
"type": "string"
},
"sublayers": {
"description": "List of sublayer references",
"type": "array",
"items": {
"description": "Sublayer identifier",
"type": "string"
}
}
},
"required": [
"name",
"sublayers"
],
"additionalProperties": false
}
}
}