]> 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 2035afff991690cbd3a507dfe4962ca4bf92887a..07345d25475ab976c38643788e04fe7369f32c0f 100644 (file)
@@ -5,7 +5,7 @@ class ApiCapability
 
   def initialize(token)
     if Settings.status != "database_offline"
 
   def initialize(token)
     if Settings.status != "database_offline"
-      user = (User.find(token.resource_owner_id) if token.respond_to?(:resource_owner_id))
+      user = User.find(token.resource_owner_id)
 
       if user&.active?
         can [:create, :comment, :close, :reopen], Note if scope?(token, :write_notes)
 
       if user&.active?
         can [:create, :comment, :close, :reopen], Note if scope?(token, :write_notes)