sul-dlss / sul-requests

Rails application for requesting materials from Stanford University Library
Other
4 stars 0 forks source link

Bug with users who place requests via library ID #757

Open jkeck opened 6 years ago

jkeck commented 6 years ago

If a user who has previously placed a request under their SUNet ID places requests under their Library ID while not authenticated (either just because or if they no longer have access to their SUNet like in the case of retirees), they will be redirected to the Success page w/o a token and receive an error. This is because the user is not logged in, however since check the current_request's user instead of the current_user the user record will respond w/ true for webauth_user? and they will be redirected w/o a token according to: https://github.com/sul-dlss/sul-requests/blob/e44bb4f3c5457329e2f33c637d4ac882b57242a8/app/controllers/requests_controller.rb#L125

We may just be able to check current_user.webauth_user? there, but will need to validate that won't cause any other issues.

This is related to https://app.honeybadger.io/projects/49963/faults/37563129

jkeck commented 6 years ago

Branch w/ a failing test @ https://github.com/sul-dlss/sul-requests/compare/757-lib-id-bug