]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api_controller.rb
Merge remote-tracking branch 'upstream/pull/1668'
[rails.git] / app / controllers / api_controller.rb
index c36ded1c0bff58123ab690b2bc754dc557a48728..9324a8ed56a4c4eb2351123a0c7d677ce56fd894 100644 (file)
@@ -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
                      []