]> git.openstreetmap.org Git - rails.git/commitdiff
Remove current_user branch from ApiController#deny_access
authorAnton Khorev <tony29@yandex.ru>
Fri, 14 Feb 2025 22:20:06 +0000 (01:20 +0300)
committerAnton Khorev <tony29@yandex.ru>
Fri, 14 Feb 2025 22:20:06 +0000 (01:20 +0300)
Unreachable because if there's no doorkeeper_token, there's also no current_user.

app/controllers/api_controller.rb

index bcd43a273020bb2da68575e692c3593b5b25fa1d..0fe1ba18d0449f3a2c2899e346a6028f2ca1187c 100644 (file)
@@ -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