canvas-lms/app/models/attachments
John Corrigan e745f742a7 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>
2015-07-27 18:40:47 +00:00
..
local_storage.rb don't move files to the same spot just for fun 2015-06-23 17:44:59 +00:00
s3_storage.rb only use root_attachments if they are valid 2015-04-22 23:39:33 +00:00
scoped_to_user.rb add Attachments::ScopedToUser 2015-07-27 18:40:47 +00:00
verification.rb fix sharing private eportfolios with verifier link 2015-04-29 17:25:56 +00:00