Commit Graph

22 Commits

Author SHA1 Message Date
James Williams 7a3ed9419f remove user profile linkedin integration
leave gem and authentication provider alone for now

test plan:
* the button on user settings page to integrate with
linked in should no longer be shown
* logging in through linked in should work as before

flag=none
closes #LA-4

Change-Id: I8e7ac10df27454db90a14d636ff0f4317978c289
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/216617
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Tested-by: Jenkins
QA-Review: Carl Kibler <ckibler@instructure.com>
Product-Review: James Williams <jamesw@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
2019-11-13 21:29:54 +00:00
Cody Cutrer 50bd41aa3d spec: mocha => rspec-mocks for integration specs
Change-Id: I974b679729568020564fde606de2479e8d959f86
Reviewed-on: https://gerrit.instructure.com/120703
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
2017-07-27 17:42:18 +00:00
Landon Wilkins 0ce4a23f58 da licença part 46
add consistent license headers to all source files

Change-Id: If9d3b01addc4fd9c2977bf2402dda57ec622e72f
Reviewed-on: https://gerrit.instructure.com/110151
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-28 17:56:22 +00:00
Simon Williams 472ce5ecaa refactor LinkedIn::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33856

test plan:
- register linked in as a user service
- it should work

Change-Id: I158e132314569dd960e04c6c863db90146b8062a
Reviewed-on: https://gerrit.instructure.com/97542
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
2017-01-10 22:41:32 +00:00
Simon Williams bf7456da8c refactor Twitter::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33854

test plan:
- register twitter as a user service
- it should work

Change-Id: I9dd2c7b85dd9937ebe2653a5e1309757812b6bf2
Reviewed-on: https://gerrit.instructure.com/97537
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-09 19:09:21 +00:00
Brad Horrocks 3fee901ac0 Remove Google Docs plugin
Google drive relevant code has been moved to the gems/google_drive
Actually test google drive with mocked api responses
cleaned up lots of code

Fixes PLAT-1301

Test Plan:
*** You'll need to use 2 separate google accounts to fully test ***
** Its helpful to have multiple chrome profiles so you dont have to log in and
** out a bunch https://support.google.com/chrome/answer/2364824?hl=en

BEFORE SWITCHING TO THIS PATCH SET
  - Make sure you have some google doc collaborations
    - Directions for creating one are below
  - Disable your google docs plugin

Switch to the patch set
Enable google drive. (if not already)
  - You should be able to paste in a client_secrets.json
  - Update Redirect URI to point to your local instance (The URI should exist in the JSON)

As an admin/teacher
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto Collaborations
    - Make sure existing collaborations still work
    - Click "Start new collaboration"
    - give it a nice name (Created by admin)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google
    - create another collaboration without the student (Created by admin, no users)
  - Create an assignment with
    Submission Type: Online
    Online Entry Options: File Uploads
  - Make sure your student has access to the course/assignment
  - Goto Account settings -> Users
    - Click View User Groups in the top right
    - create a new group set with a group in it
    - add yourself and your student to the group
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Click "Start new collaboration"
    - give it a nice name (Created by admin for group)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google

As a student
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto the assignment
    - Submit the assignment
    - You should have a "Google Doc" tab
    - Choose a document and submit it
    - After it submitted, click download on the right side
      just to make sure its correct
  - Goto Collaborations
    - Make sure existing collaborations still work
    - make sure the "created by admin" collaboration works
    - make sure you can't see "Created by admin, no users"
    - Click "Start new collaboration"
    - give it a nice name (created by a student)
    - click start collaborating
    - You should be redirected to the new doc in google
    - Switch to your admin/teacher and make sure they can't access it
    - Edit the collaboration add the teacher, click Save
    - Switch to your admin/teacher and make sure they can access it
  - Goto `profile/settings` and REMOVE the google drive user service
  - Go back to collaborations
  - You should be forced to add the google service in order to use a collaboration
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Make sure you can access "Created by admin for group"
    - Click "Start new collaboration"
    - select your admin/teacher
    - click start collaborating
    - You should be redirected to the new doc in google
    - make sure your admin can access it to

As a site admin
  - Disable Google Drive
  - Then with your student
    - Make sure you can still do file upload submissions on the assignment
    - Collaborations should no longer show up (unless you have etherpad enabled)
  - Google drive should no longer show up in your profile settings as a registered service
Change-Id: I4dfaff6f5262743c044aadd12266fd0bd85a60e1
Reviewed-on: https://gerrit.instructure.com/69078
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-01 23:41:53 +00:00
James Williams 02b3b2ee2b Revert "fix oauth_requests user foreign key violations"
This reverts commit c45101365b.

Change-Id: Icc49193ef99948a66ff83f7fc54f5bc596b82188
Reviewed-on: https://gerrit.instructure.com/65086
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-15 15:51:12 +00:00
James Williams c45101365b fix oauth_requests user foreign key violations
closes #CNVS-9599

Change-Id: I0d34bb01dfdfbbbef9ba574ffa3eecb1b3e36f42
Reviewed-on: https://gerrit.instructure.com/64988
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-10-12 19:34:57 +00:00
Cody Cutrer e719d737f4 more no more dynamic finders
Change-Id: Ibd26ab5b324efff3b9b1af52ac225198f440d8a7
Reviewed-on: https://gerrit.instructure.com/43599
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-11-04 18:57:05 +00:00
Cody Cutrer a40c037d81 rspec 3-ify spec/integration
refs CNVS-16239

Change-Id: Ifdda42582111e144648af46ab6c383f71c1858ab
Reviewed-on: https://gerrit.instructure.com/42678
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
QA-Review: Braden Anderson <braden@instructure.com>
2014-10-14 14:49:18 +00:00
Raphael Weiner a13f85e0ed move twitter to gem
fixes: CNVS-12492

test-plan:
* Test that all things Twitter related still work

Change-Id: Ib656c5bfcb2dc8490a6fa6f214b0f6dce25ad181
Reviewed-on: https://gerrit.instructure.com/33193
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-05 20:08:27 +00:00
Nathan Mills 8eeb4f5bf0 refactor twitter to not be a mixin
fixes: CNVS-12118

test-plan:
*twitter integration should work

Change-Id: I44a9011eb451aaa8eb196264bb4b65d1635da083
Reviewed-on: https://gerrit.instructure.com/33065
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-05 20:08:17 +00:00
Raphael Weiner 8be0ae37d7 Move google_docs code into a gem
fixes: CNVS-12329

Change-Id: I044725c93582cbca39a61e036bb5f0385e069c1e
Reviewed-on: https://gerrit.instructure.com/32990
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-25 21:50:43 +00:00
Raphael Weiner c8d7b9f915 Further decoupling of google_docs from models and controllers.
fixes: CNVS-12328

test plan:
  - as admin enable the google_doc plugin
  - as student visit `/profile/settings`
  - click 'Google Docs' under the 'Other Services' section
  - click 'Authorize Google Doc Access' in modal
  - when redirect to google, click 'Allow access'
  - verify success banner displays

Change-Id: I2b45ffa38ac0d1d810fb988335f4cd39154ae2a6
Reviewed-on: https://gerrit.instructure.com/32949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-25 21:50:34 +00:00
Raphael Weiner 732d4991e5 extract linkedin into a gem and add tests
fixes: CNVS-12119

test plan:
regression test linkedin functionality

Change-Id: I9cec121d641db37d4c8f6a04966e766e9f8b293e
Reviewed-on: https://gerrit.instructure.com/33473
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 20:23:55 +00:00
Raphael Weiner a79605a2ce remove Canvas specific code from LinkedIn
fixes: CNVS-12505

test plan:
regression test linked in functionality

Change-Id: I7d4c327eefb8ac976c1d51e36aa6514c1742f739
Reviewed-on: https://gerrit.instructure.com/33458
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 20:21:47 +00:00
Raphael Weiner 19926a2120 Change LinkedIn to be standalone class not mixin.
fixes: CNVS-12498

Test Plan:
* regression test linkedin functionality

Change-Id: I7ba55dea595d6380e68d5a90b272d67807cb55cf
Reviewed-on: https://gerrit.instructure.com/33441
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
2014-04-23 17:30:27 +00:00
Raphael Weiner 101cd37bb6 Cleanup google_docs
Change-Id: Iaa8545a3f39cd8708b1ea20a9c27836dcbdacb0a
Reviewed-on: https://gerrit.instructure.com/32860
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-10 17:32:01 +00:00
Raphael Weiner 7054118441 Refactor google docs to be standalone not mixin.
fixes: CNVS-12096

Change-Id: I6fa7d6d57bfc9063b49334a8e528aaaa9fc7f8c2
Reviewed-on: https://gerrit.instructure.com/32715
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <banderson@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-04-10 17:31:39 +00:00
Cameron Matheson 9b0919d855 fix a bunch of spec failures
Change-Id: Ie63d9219aa0a5405da43a2629197183bde9907da
2012-06-13 16:21:15 -06:00
Cameron Matheson db5c12af9b deprecate singleto profile url
Change-Id: I3542aff575e200aff4a953f1b8068ebd1f2ac20c
2012-06-11 12:35:10 -06:00
Brian Palmer 4efba9ac0a update oauth lib to 0.4.5 and our usage to oauth 1.0a
This gem update required updating our twitter, linkedin, and gdocs
integrations to correctly provide the redirect uri and use the oauth
verifier on return, which we weren't doing before.

As a consequence, google no longer displays a big scary warning about
Canvas not being secure in its oauth usage.

Facebook uses oauth 2.0, so no changes were needed there.

refs #5892

refs #6127 (this stuff needs refactoring)

Change-Id: I04289638915b84dbe439bd57b36da90151c662b9
Reviewed-on: https://gerrit.instructure.com/6585
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-11-01 12:08:10 -06:00