Wiki source code of Permissions Configuration

Version 9.1 by colinw on 2014/11/10 22:21

Hide last authors
colinw 9.1 1 ==== **//On this page~://** ====
colinw 7.1 2
3
4
colinw 9.1 5 {{toc maxLevel="2" indent="1"/}}
colinw 7.1 6
colinw 9.1 7 = Description =
colinw 7.1 8
colinw 9.1 9 The Permissions resource provides access to query and define permissions for iSymphony.
colinw 7.1 10
11 = Root Resource Paths =
12
13 {{code}}
14 communication_manager/api/resource/core/{core_server_id}/permissions
colinw 9.1 15 communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions
colinw 7.1 16 {{/code}}
17
18 = JSON Representation =
19
20 {{code title="PermissionConfig" language="js"}}
21 {
22 "key": "cellPhoneOriginateTo",
23 "allowed": false,
24 "exceptions": [
25 "df41edec-2707-46eb-8b8f-146b01d9b29e"
26 ],
27 "inherited": false
28 }
29 {{/code}}
30
31 |=(((
32 Property
33 )))|=(((
34 Type
35 )))|=(((
36 Description
37 )))
38 |(((
39 {{{key}}}
40 )))|(((
41 String
42 )))|(((
43 The key used for this permission configuration.
44 )))
45 |(% colspan="1" %)(% colspan="1" %)
46 (((
47 allowed
48 )))|(% colspan="1" %)(% colspan="1" %)
49 (((
50 Boolean
51 )))|(% colspan="1" %)(% colspan="1" %)
52 (((
53 Whether the action should be generally allowed or not.
54 )))
55 |(% colspan="1" %)(% colspan="1" %)
56 (((
57 exceptions
58 )))|(% colspan="1" %)(% colspan="1" %)
59 (((
60 Array of Strings (UUID)
61 )))|(% colspan="1" %)(% colspan="1" %)
62 (((
63 The objects defined in the exceptions will be granted or denied access as exceptions to the general rule.
64 )))
65 |(% colspan="1" %)(% colspan="1" %)
66 (((
67 inherited
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 Boolean
71 )))|(% colspan="1" %)(% colspan="1" %)
72 (((
73 Used internally. Should never be true when using the REST system.
74 )))
75
76 = Resource Paths =
77
78 |=(% colspan="2" %)(% colspan="2" %)
79 (((
colinw 9.1 80 {{{communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}}}}
colinw 7.1 81
colinw 9.1 82 {{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}}}}
colinw 7.1 83 )))
84 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
85 (((
86 **Description**
87 )))|(((
88 Retrieves permissions for the user group identified by the {user_group_id} path parameter.
89
90 **Parameters**:
91
92 * core_server_id: The UUID of the core server.
93 * core_server_slug: The unique identifying slug of the core server.
94 * user_group_id: The UUID of the user group.
95
96 **Errors**:
97
98 * 404 'No user group exists with that id.': Returned if the provided user_group_id does not match a user group in the system.
99 )))
100 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
101 (((
102 **GET**
103 )))|(((
104 Retrieves all permissions defined for the user group.
105 )))
106
107 |=(% colspan="2" %)(% colspan="2" %)
108 (((
109 {{{communication_manager/api/resource/core/{core_server_id}/permissions/userGroup/{user_group_id}/{key}}}}
colinw 9.1 110
111 {{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/userGroup/{user_group_id}/{key}}}}
colinw 7.1 112 )))
113 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
114 (((
115 **Description**
116 )))|(((
117 Retrieves or updates a specific permission for a user group.
118
119 **Parameters**:
120
121 * core_server_id: The UUID of the core server.
122
123 * core_server_slug: The unique identifying slug of the core server.
124
125 * user_group_id: The UUID of the user group.
126
127 * key: The permission key identifying the permission.
128
129 **Errors**:
130
131 * 404 'No user group exists with that id.': Returned if the provided user_group_id does not match a user group in the system.
132 )))
133 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
134 (((
135 **GET**
136 )))|(((
137 Retrieves a specific permission for the user group.
138
139 **Errors**:
140
141 * 404 'No permission with that key is defined for that user group.': Returned if there is no permission defined for the user group with that permission key.
142 )))
143 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
144 (((
145 **PUT**
146 )))|(((
147 Sets the permission definition for the user group with the specified key. The key defined in the permission definition body must match the key used in the URL.
148
149 **Errors**:
150
151 * 412 'You must specify a key for a permission.': Returned if the permission definition that is supplied does not have a key defined.
152 * 412 'You cannot specify an inherited permission. Remove the permission instead.': Returned if the inherited flag of the permission definition is set to true.
153 )))
154 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
155 (((
156 **DELETE**
157 )))|(% colspan="1" %)(% colspan="1" %)
158 (((
159 Clears the specific permission definition for the user group.
160
161 **Errors**:
162
163 * 404 'No permission with that key is defined for that user group.': Returned if there is no permission defined for the user group with that permission key.
164 )))
165
166 |=(% colspan="2" %)(% colspan="2" %)
167 (((
168 {{{communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}}}}
colinw 9.1 169
170 {{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}}}}
colinw 7.1 171 )))
172 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
173 (((
174 **Description**
175 )))|(((
176 Retrieves permissions for the user group identified by the {user_id} path parameter.
177
178 **Parameters**:
179
180 * core_server_id: The UUID of the core server.
181 * core_server_slug: The unique identifying slug of the core server.
182 * user_id: The UUID of the user.
183
184 **Errors**:
185
186 * 404 'No user exists with that id.': Returned if the provided user_id does not match a user in the system.
187 )))
188 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
189 (((
190 **GET**
191 )))|(((
192 Retrieves all permissions defined for the user.
193 )))
194
195 |=(% colspan="2" %)(% colspan="2" %)
196 (((
197 {{{communication_manager/api/resource/core/{core_server_id}/permissions/user/{user_id}/{key}}}}
colinw 9.1 198
199 {{{communication_manager/api/resource/core/getBySlug/{core_server_slug}/permissions/user/{user_id}/{key}}}}
colinw 7.1 200 )))
201 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
202 (((
203 **Description**
204 )))|(((
205 Retrieves or updates a specific permission for a user group.
206
207 **Parameters**:
208
209 * core_server_id: The UUID of the core server.
210
211 * core_server_slug: The unique identifying slug of the core server.
212
213 * user_id: The UUID of the user.
214
215 * key: The permission key identifying the permission.
216
217 **Errors**:
218
219 * 404 'No user exists with that id.': Returned if the provided user_id does not match a user in the system.
220 )))
221 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
222 (((
223 **GET**
224 )))|(((
225 Retrieves a specific permission for the user.
226
227 **Errors**:
228
229 * 404 'No permission with that key is defined for that user.': Returned if there is no permission defined for the user with that permission key.
230 )))
231 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
232 (((
233 **PUT**
234 )))|(((
235 Sets the permission definition for the user with the specified key. The key defined in the permission definition body must match the key used in the URL.
236
237 **Errors**:
238
239 * 412 'You must specify a key for a permission.': Returned if the permission definition that is supplied does not have a key defined.
240 * 412 'You cannot specify an inherited permission. Remove the permission instead.': Returned if the inherited flag of the permission definition is set to true.
241 )))
242 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
243 (((
244 **DELETE**
245 )))|(% colspan="1" %)(% colspan="1" %)
246 (((
247 Clears the specific permission definition for the user.
248
249 **Errors**:
250
251 * 404 'No permission with that key is defined for that user.': Returned if there is no permission defined for the user with that permission key.
252 )))
253
colinw 9.1 254 = Sub/Child Resource Paths =
255
256 |=(% colspan="2" %)(% colspan="2" %)
257 (((
258 {{{path}}}
259 )))
260 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
261 (((
262 **Description**
263 )))|(% colspan="1" %)(% colspan="1" %)
264 (((
265 description
266 )))
267
colinw 7.1 268 = Curl Examples =
269
colinw 9.1 270 === Get ===
colinw 7.1 271
272 {{code language="bash"}}
colinw 9.1 273  
colinw 7.1 274 {{/code}}
275
colinw 9.1 276 === (% style="color: rgb(0,0,0);" %)Update(%%) ===
colinw 7.1 277
colinw 9.1 278 {{code language="bash"}}
279  
colinw 7.1 280 {{/code}}
281
colinw 9.1 282 === Add ===
colinw 7.1 283
284 {{code language="bash"}}
colinw 9.1 285  
colinw 7.1 286 {{/code}}
287
colinw 9.1 288 === Delete ===
colinw 7.1 289
290 {{code language="bash"}}
colinw 9.1 291  
colinw 7.1 292 {{/code}}