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.
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 thecurrent_user
the user record will respond w/true
forwebauth_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#L125We 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