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:
Marius Balteanu
2025-06-12 07:05:01 +00:00
parent ebdd1a40f4
commit e56d84b632
29 changed files with 11 additions and 750 deletions

View File

@@ -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|