]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/api/notes_controller.rb
Merge remote-tracking branch 'upstream/pull/5544'
[rails.git] / app / controllers / api / notes_controller.rb
index 7e2e7fb793babed86952313cc1d0703043d2f760..eca0728b65700d90d7ea2f38126c9e06fe961d7c 100644 (file)
@@ -384,11 +384,7 @@ module Api
     def add_comment(note, text, event, notify: true)
       attributes = { :visible => true, :event => event, :body => text }
 
     def add_comment(note, text, event, notify: true)
       attributes = { :visible => true, :event => event, :body => text }
 
-      if doorkeeper_token
-        author = current_user if scope_enabled?(:write_notes)
-      else
-        author = current_user
-      end
+      author = current_user if scope_enabled?(:write_notes)
 
       if author
         attributes[:author_id] = author.id
 
       if author
         attributes[:author_id] = author.id