parent
6963d494ae
commit
4221f5edb3
|
@ -124,7 +124,7 @@ class ApplicationController < ActionController::Base
|
||||||
else
|
else
|
||||||
# HTTP Basic, either username/password or API key/random
|
# HTTP Basic, either username/password or API key/random
|
||||||
authenticate_with_http_basic do |username, password|
|
authenticate_with_http_basic do |username, password|
|
||||||
user = User.try_to_login(username, password)[0] || User.find_by_api_key(username)
|
user = User.try_to_login(username, password) || User.find_by_api_key(username)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Switch user if requested by an admin user
|
# Switch user if requested by an admin user
|
||||||
|
|
Loading…
Reference in New Issue