[openstreetmap/openstreetmap-website] Adds storing note's properties to notes (PR #5650)
Tom Hughes
notifications at github.com
Tue Feb 11 18:46:11 UTC 2025
@tomhughes requested changes on this pull request.
> @@ -379,17 +382,30 @@ def bbox_condition(notes)
end
end
+ ##
+ # Get author's information (for logged in users - user_id, for logged out users - IP address)
+ def author_info
+ author = current_user if scope_enabled?(:write_notes)
I realise this is just copying the old code but I don't think we need to do this in this way now - if the scope is enabled then there must be a current user so we can just make the `if` below do the scope test and then use `current_user.id` to set the user id?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5650#pullrequestreview-2609675661
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5650/review/2609675661 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250211/a3946659/attachment.htm>
More information about the rails-dev
mailing list