mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 10:56:17 +01:00
Reverts r23835 due to wrong issue ID (#40856).
git-svn-id: https://svn.redmine.org/redmine/trunk@23836 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -131,14 +131,6 @@ class ApplicationController < ActionController::Base
|
||||
if (key = api_key_from_request)
|
||||
# Use API key
|
||||
user = User.find_by_api_key(key)
|
||||
elsif access_token = Doorkeeper.authenticate(request)
|
||||
# Oauth
|
||||
if access_token.accessible?
|
||||
user = User.active.find_by_id(access_token.resource_owner_id)
|
||||
user.oauth_scope = access_token.scopes.all.map(&:to_sym)
|
||||
else
|
||||
doorkeeper_render_error
|
||||
end
|
||||
elsif /\ABasic /i.match?(request.authorization.to_s)
|
||||
# HTTP Basic, either username/password or API key/random
|
||||
authenticate_with_http_basic do |username, password|
|
||||
|
||||
Reference in New Issue
Block a user