Commit e745f74
John Corrigan
add Attachments::ScopedToUser
fixes CNVS-21854
Moves permission-based scope concatenation from
FilesController#api_index to Attachments::ScopedToUser#scope. Updates
Folder permission policy to delegate permissions for :read_as_admin &
:manage_files to its context. Add Folder.from_context_or_id to
encapsulate folder finding logic from FilesController#api_index.
test plan:
- Regression testing for API files index action.
Change-Id: I1dc855cc16a98969482a72d251848c47e300b05c
Reviewed-on: https://gerrit.instructure.com/58415
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>1 parent 41d1536 commit e745f74
4 files changed
Lines changed: 100 additions & 36 deletions
File tree
- app
- controllers
- models
- attachments
- spec/models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
188 | 195 | | |
189 | 196 | | |
190 | 197 | | |
| |||
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 259 | + | |
| 260 | + | |
260 | 261 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 262 | + | |
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
284 | 270 | | |
285 | 271 | | |
286 | 272 | | |
| |||
307 | 293 | | |
308 | 294 | | |
309 | 295 | | |
310 | | - | |
| 296 | + | |
311 | 297 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
316 | 304 | | |
317 | 305 | | |
318 | 306 | | |
| |||
1104 | 1092 | | |
1105 | 1093 | | |
1106 | 1094 | | |
1107 | | - | |
1108 | 1095 | | |
1109 | 1096 | | |
1110 | 1097 | | |
| |||
1121 | 1108 | | |
1122 | 1109 | | |
1123 | 1110 | | |
1124 | | - | |
1125 | 1111 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
467 | 473 | | |
468 | 474 | | |
469 | 475 | | |
| |||
479 | 485 | | |
480 | 486 | | |
481 | 487 | | |
482 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
483 | 491 | | |
484 | 492 | | |
485 | 493 | | |
| |||
489 | 497 | | |
490 | 498 | | |
491 | 499 | | |
| 500 | + | |
492 | 501 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
310 | 333 | | |
0 commit comments