[openstreetmap/openstreetmap-website] Remove authorize_web call from traces api controller (PR #4243)
Anton Khorev
notifications at github.com
Sat Sep 9 16:49:21 UTC 2023
Traces api controller happens to be the only api controller that calls authorize_web.
This call was there since the traces api was added in https://github.com/openstreetmap/openstreetmap-website/commit/01cfcbd845c5d8d33f83bb22a24cf35932da2e29 and was copied over when web and api controllers were separated in https://github.com/openstreetmap/openstreetmap-website/commit/5f59845575ed313688eca669fd73f4f6a5993c23.
But it doesn't do anything. There's no session so no if branches with conditions on session are run https://github.com/openstreetmap/openstreetmap-website/blob/0e21afc56593eb9fce14d8cfe0984494e758c150/app/controllers/application_controller.rb#L24
There's no current_user at this point so the final line also doesn't do anything
https://github.com/openstreetmap/openstreetmap-website/blob/0e21afc56593eb9fce14d8cfe0984494e758c150/app/controllers/application_controller.rb#L51
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4243
-- Commit Summary --
* Remove authorize_web call from traces api controller
-- File Changes --
M app/controllers/api/traces_controller.rb (1)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4243.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4243.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4243
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4243 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230909/212391fe/attachment.htm>
More information about the rails-dev
mailing list