<p></p>
<p><b>@tomhughes</b> requested changes on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5650#discussion_r1951391688">app/controllers/api/notes_controller.rb</a>:</p>
<pre style='color:#555'>> @@ -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)
</pre>
<p dir="auto">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 <code class="notranslate">if</code> below do the scope test and then use <code class="notranslate">current_user.id</code> to set the user id?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5650#pullrequestreview-2609675661">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLI7BHDWUADX2TYES2T2PJAPHAVCNFSM6AAAAABW4QPQBOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMBZGY3TKNRWGE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKYUDNTUTD3DY7QDZL2PJAPHA5CNFSM6AAAAABW4QPQBOWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTU3RR6Y2.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5650/review/2609675661</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5650#pullrequestreview-2609675661",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5650#pullrequestreview-2609675661",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>