Prefer authentication token for session if present

This commit is contained in:
Sebastian Serth
2022-10-05 21:31:24 +02:00
parent 4f5f71840a
commit 42688ed1c9
2 changed files with 19 additions and 2 deletions

View File

@ -22,10 +22,10 @@ class ApplicationController < ActionController::Base
end
def find_or_login_current_user
ExternalUser.find_by(id: session[:external_user_id]) ||
login_from_authentication_token ||
ExternalUser.find_by(id: session[:external_user_id]) ||
login_from_session ||
login_from_other_sources ||
login_from_authentication_token ||
nil
end
private :find_or_login_current_user