Commit Graph

1 Commits

Author SHA1 Message Date
Jacob Fugal 2bdca4957e consider request host when choosing oauth host
fixes RECNVS-361

instead of just using Attachment.current_root_account.domain

to facilitate the change, all generation of non-public links to external
file storage go through a FileAuthenticator instance that holds the
necessary information about the current user and oauth host

test-plan:
[locally]
- smoke test file uploads and downloads, there should be no impact on
  behavior, just a refactor
[once on beta]
- enable inst-fs in your sandbox
- logout of canvas
- open network logging in your browser dev tools and log back in to
  canvas
- identify the requests related to the inst-fs login pixel and
  corresponding oauth redirects
- the oauth should have occurred against your beta sandbox, not your
  production sandbox
- attempt to upload a file; should be successful

Change-Id: Ic859b707908baef84f5ee4dba29f18bdd841abcc
Reviewed-on: https://gerrit.instructure.com/143930
Tested-by: Jenkins
Reviewed-by: Michael Jasper <mjasper@instructure.com>
QA-Review: Collin Parrish <cparrish@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2018-03-20 04:25:18 +00:00