@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/2609675...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to