Skip to content

Commit

Permalink
Revert c5b51bb
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Mar 5, 2024
1 parent 2ff8c3b commit 8f6fcc1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ def create
user = User.from_omniauth(auth, institution: current_institution)
if !user&.enabled
unauthorized(message: "This user account is disabled.") and return
elsif params[:provider] == "saml" && user.institution != current_institution
unauthorized(message: "You must log in via your home institution's domain.") and return
elsif user.institution != current_institution
unless user.sysadmin?(client_ip: request_context.client_ip,
client_hostname: request_context.client_hostname)
unauthorized(message: "You must log in via your home institution's domain.") and return
end
end

begin
Expand Down

0 comments on commit 8f6fcc1

Please sign in to comment.