]> git.openstreetmap.org Git - rails.git/blobdiff - app/abilities/api_capability.rb
Remove unused layouts.donate string
[rails.git] / app / abilities / api_capability.rb
index 44e67634552599c861f9320209e8a7810a155edd..07345d25475ab976c38643788e04fe7369f32c0f 100644 (file)
@@ -5,11 +5,7 @@ class ApiCapability
 
   def initialize(token)
     if Settings.status != "database_offline"
-      user = if token.respond_to?(:resource_owner_id)
-               User.find(token.resource_owner_id)
-             elsif token.respond_to?(:user)
-               token.user
-             end
+      user = User.find(token.resource_owner_id)
 
       if user&.active?
         can [:create, :comment, :close, :reopen], Note if scope?(token, :write_notes)