X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/124ec2e9d560e0df291e5a8e5aa67ef5db2f5d46..6e612d953a555cabd24b49aa9e7d008c6b077086:/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 []