Skip to content

Commit

Permalink
Merge pull request #782 from uktrade/develop
Browse files Browse the repository at this point in the history
Bypass SSO session requirement for editors (#781)
  • Loading branch information
rafa-garcia authored May 27, 2021
2 parents 8b6ade3 + b6c4444 commit 1da3e46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ def determine_layout
# This method checks and signs them into ExOps if needed
before_action :force_sign_in_parity
def force_sign_in_parity
# A sso session cookie must be present to qualify for sign-in
sign_out current_user unless cookies[sso_session_cookie]
# A sso session cookie must be present to qualify for sign-in – users only
unless request.path.include?('/admin')
sign_out current_user unless cookies[sso_session_cookie]
end

return if current_user
return if (sso_id = cookies[sso_session_cookie]).blank?

Expand Down

0 comments on commit 1da3e46

Please sign in to comment.