From: Anton Khorev Date: Fri, 14 Feb 2025 22:20:06 +0000 (+0300) Subject: Remove current_user branch from ApiController#deny_access X-Git-Tag: live~180^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/03867e2fee60ffbfca44fc971605272d4d04582f Remove current_user branch from ApiController#deny_access Unreachable because if there's no doorkeeper_token, there's also no current_user. --- diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index bcd43a273..0fe1ba18d 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -82,8 +82,6 @@ class ApiController < ApplicationController if doorkeeper_token set_locale report_error t("oauth.permissions.missing"), :forbidden - elsif current_user - head :forbidden else head :unauthorized end