From: Tom Hughes Date: Sat, 15 Feb 2025 08:50:34 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5674' X-Git-Tag: live~610 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/485cbf59b083ac215adcaa7359788047bf89a3ff?hp=09555d06687f763800c03a2c2794897073260fc4 Merge remote-tracking branch 'upstream/pull/5674' --- diff --git a/app/controllers/api/notes_controller.rb b/app/controllers/api/notes_controller.rb index bc4d2eaf2..a0095d954 100644 --- a/app/controllers/api/notes_controller.rb +++ b/app/controllers/api/notes_controller.rb @@ -387,7 +387,7 @@ module Api ## # Get author's information (for logged in users - user_id, for logged out users - IP address) def author_info - if scope_enabled?(:write_notes) + if current_user { :user_id => current_user.id } else { :user_ip => request.remote_ip }