X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/124ec2e9d560e0df291e5a8e5aa67ef5db2f5d46..ee53b7a298e75ac4c75866d6edea0a2611bdb663:/app/controllers/api_controller.rb diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb index c36ded1c0..9324a8ed5 100644 --- a/app/controllers/api_controller.rb +++ b/app/controllers/api_controller.rb @@ -305,7 +305,7 @@ class ApiController < ApplicationController def permissions @permissions = if current_token.present? ClientApplication.all_permissions.select { |p| current_token.read_attribute(p) } - elsif @user + elsif current_user ClientApplication.all_permissions else []