`scope_enabled?` returns nil if there's no `doorkeeper_token`, then 
`author` stays undefined. The else branch removed in this PR would have done 
the same because there's no `current_user` in this case too.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5544

-- Commit Summary --

  * Simplify write_notes scope check in api notes controller

-- File Changes --

    M app/controllers/api/notes_controller.rb (6)
    M test/controllers/api/notes_controller_test.rb (11)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5544.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5544.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5544
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to