|
24 | 24 | policy.DocumentedRuleDefault(
|
25 | 25 | name="add_image",
|
26 | 26 | check_str=base.ADMIN_OR_PROJECT_MEMBER_CREATE_IMAGE,
|
27 |
| - scope_types=['system', 'project'], |
| 27 | + scope_types=['project'], |
28 | 28 | description='Create new image',
|
29 | 29 | operations=[
|
30 | 30 | {'path': '/v2/images',
|
|
38 | 38 | policy.DocumentedRuleDefault(
|
39 | 39 | name="delete_image",
|
40 | 40 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
41 |
| - scope_types=['system', 'project'], |
| 41 | + scope_types=['project'], |
42 | 42 | description='Deletes the image',
|
43 | 43 | operations=[
|
44 | 44 | {'path': '/v2/images/{image_id}',
|
|
52 | 52 | policy.DocumentedRuleDefault(
|
53 | 53 | name="get_image",
|
54 | 54 | check_str=base.ADMIN_OR_PROJECT_READER_GET_IMAGE,
|
55 |
| - scope_types=['system', 'project'], |
| 55 | + scope_types=['project'], |
56 | 56 | description='Get specified image',
|
57 | 57 | operations=[
|
58 | 58 | {'path': '/v2/images/{image_id}',
|
|
66 | 66 | policy.DocumentedRuleDefault(
|
67 | 67 | name="get_images",
|
68 | 68 | check_str=base.ADMIN_OR_PROJECT_READER,
|
69 |
| - scope_types=['system', 'project'], |
| 69 | + scope_types=['project'], |
70 | 70 | description='Get all available images',
|
71 | 71 | operations=[
|
72 | 72 | {'path': '/v2/images',
|
|
80 | 80 | policy.DocumentedRuleDefault(
|
81 | 81 | name="modify_image",
|
82 | 82 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
83 |
| - scope_types=['system', 'project'], |
| 83 | + scope_types=['project'], |
84 | 84 | description='Updates given image',
|
85 | 85 | operations=[
|
86 | 86 | {'path': '/v2/images/{image_id}',
|
|
94 | 94 | policy.DocumentedRuleDefault(
|
95 | 95 | name="publicize_image",
|
96 | 96 | check_str='role:admin',
|
97 |
| - scope_types=['system', 'project'], |
| 97 | + scope_types=['project'], |
98 | 98 | description='Publicize given image',
|
99 | 99 | operations=[
|
100 | 100 | {'path': '/v2/images/{image_id}',
|
|
104 | 104 | policy.DocumentedRuleDefault(
|
105 | 105 | name="communitize_image",
|
106 | 106 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
107 |
| - scope_types=['system', 'project'], |
| 107 | + scope_types=['project'], |
108 | 108 | description='Communitize given image',
|
109 | 109 | operations=[
|
110 | 110 | {'path': '/v2/images/{image_id}',
|
|
119 | 119 | policy.DocumentedRuleDefault(
|
120 | 120 | name="download_image",
|
121 | 121 | check_str=base.ADMIN_OR_PROJECT_MEMBER_DOWNLOAD_IMAGE,
|
122 |
| - scope_types=['system', 'project'], |
| 122 | + scope_types=['project'], |
123 | 123 | description='Downloads given image',
|
124 | 124 | operations=[
|
125 | 125 | {'path': '/v2/images/{image_id}/file',
|
|
133 | 133 | policy.DocumentedRuleDefault(
|
134 | 134 | name="upload_image",
|
135 | 135 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
136 |
| - scope_types=['system', 'project'], |
| 136 | + scope_types=['project'], |
137 | 137 | description='Uploads data to specified image',
|
138 | 138 | operations=[
|
139 | 139 | {'path': '/v2/images/{image_id}/file',
|
|
148 | 148 | policy.DocumentedRuleDefault(
|
149 | 149 | name="delete_image_location",
|
150 | 150 | check_str="role:admin",
|
151 |
| - scope_types=['system', 'project'], |
| 151 | + scope_types=['project'], |
152 | 152 | description='Deletes the location of given image',
|
153 | 153 | operations=[
|
154 | 154 | {'path': '/v2/images/{image_id}',
|
|
162 | 162 | policy.DocumentedRuleDefault(
|
163 | 163 | name="get_image_location",
|
164 | 164 | check_str=base.ADMIN_OR_PROJECT_READER,
|
165 |
| - scope_types=['system', 'project'], |
| 165 | + scope_types=['project'], |
166 | 166 | description='Reads the location of the image',
|
167 | 167 | operations=[
|
168 | 168 | {'path': '/v2/images/{image_id}',
|
|
176 | 176 | policy.DocumentedRuleDefault(
|
177 | 177 | name="set_image_location",
|
178 | 178 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
179 |
| - scope_types=['system', 'project'], |
| 179 | + scope_types=['project'], |
180 | 180 | description='Sets location URI to given image',
|
181 | 181 | operations=[
|
182 | 182 | {'path': '/v2/images/{image_id}',
|
|
191 | 191 | policy.DocumentedRuleDefault(
|
192 | 192 | name="add_member",
|
193 | 193 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
194 |
| - scope_types=['system', 'project'], |
| 194 | + scope_types=['project'], |
195 | 195 | description='Create image member',
|
196 | 196 | operations=[
|
197 | 197 | {'path': '/v2/images/{image_id}/members',
|
|
205 | 205 | policy.DocumentedRuleDefault(
|
206 | 206 | name="delete_member",
|
207 | 207 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
208 |
| - scope_types=['system', 'project'], |
| 208 | + scope_types=['project'], |
209 | 209 | description='Delete image member',
|
210 | 210 | operations=[
|
211 | 211 | {'path': '/v2/images/{image_id}/members/{member_id}',
|
|
219 | 219 | policy.DocumentedRuleDefault(
|
220 | 220 | name="get_member",
|
221 | 221 | check_str=base.ADMIN_OR_PROJECT_READER_OR_SHARED_MEMBER,
|
222 |
| - scope_types=['system', 'project'], |
| 222 | + scope_types=['project'], |
223 | 223 | description='Show image member details',
|
224 | 224 | operations=[
|
225 | 225 | {'path': '/v2/images/{image_id}/members/{member_id}',
|
|
233 | 233 | policy.DocumentedRuleDefault(
|
234 | 234 | name="get_members",
|
235 | 235 | check_str=base.ADMIN_OR_PROJECT_READER_OR_SHARED_MEMBER,
|
236 |
| - scope_types=['system', 'project'], |
| 236 | + scope_types=['project'], |
237 | 237 | description='List image members',
|
238 | 238 | operations=[
|
239 | 239 | {'path': '/v2/images/{image_id}/members',
|
|
247 | 247 | policy.DocumentedRuleDefault(
|
248 | 248 | name="modify_member",
|
249 | 249 | check_str=base.ADMIN_OR_SHARED_MEMBER,
|
250 |
| - scope_types=['system', 'project'], |
| 250 | + scope_types=['project'], |
251 | 251 | description='Update image member',
|
252 | 252 | operations=[
|
253 | 253 | {'path': '/v2/images/{image_id}/members/{member_id}',
|
|
262 | 262 | policy.RuleDefault(
|
263 | 263 | name="manage_image_cache",
|
264 | 264 | check_str='role:admin',
|
265 |
| - # NOTE(lbragstad): Remove 'project' from the list below when glance |
266 |
| - # fully supports system-scope and this policy is updated to reflect |
267 |
| - # that in the check string. |
268 |
| - scope_types=['system', 'project'], |
| 265 | + scope_types=['project'], |
269 | 266 | description='Manage image cache'
|
270 | 267 | ),
|
271 | 268 |
|
272 | 269 | policy.DocumentedRuleDefault(
|
273 | 270 | name="deactivate",
|
274 | 271 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
275 |
| - scope_types=['system', 'project'], |
| 272 | + scope_types=['project'], |
276 | 273 | description='Deactivate image',
|
277 | 274 | operations=[
|
278 | 275 | {'path': '/v2/images/{image_id}/actions/deactivate',
|
|
286 | 283 | policy.DocumentedRuleDefault(
|
287 | 284 | name="reactivate",
|
288 | 285 | check_str=base.ADMIN_OR_PROJECT_MEMBER,
|
289 |
| - scope_types=['system', 'project'], |
| 286 | + scope_types=['project'], |
290 | 287 | description='Reactivate image',
|
291 | 288 | operations=[
|
292 | 289 | {'path': '/v2/images/{image_id}/actions/reactivate',
|
|
301 | 298 | policy.DocumentedRuleDefault(
|
302 | 299 | name="copy_image",
|
303 | 300 | check_str='role:admin',
|
304 |
| - # Eventually, we need to make sure we update the check string here to |
305 |
| - # be scope-aware, but for now this is restricted to system-admins and |
306 |
| - # project-admins. That might change in the future if we decide to push |
| 301 | + # For now this is restricted to project-admins. |
| 302 | + # That might change in the future if we decide to push |
307 | 303 | # this functionality down to project-members.
|
308 |
| - scope_types=['system', 'project'], |
| 304 | + scope_types=['project'], |
309 | 305 | description='Copy existing image to other stores',
|
310 | 306 | operations=[
|
311 | 307 | {'path': '/v2/images/{image_id}/import',
|
|
0 commit comments