<p></p>
<p dir="auto">Following up on <a href="https://community.openstreetmap.org/t/my-user-is-blocked/1006/11" rel="nofollow">https://community.openstreetmap.org/t/my-user-is-blocked/1006/11</a></p>
<p dir="auto">Once a user has been blocked, they can no longer log on to community.osm.org, because fetching user details using /api/0.6/user/details is being rejected by HTTP 403 "Your access to the API has been blocked. Please log-in to the web interface to find out more.”</p>
<p dir="auto">app/controllers/api_controller.rb seems to be the relevant bit in the website code:</p>
<div class="highlight highlight-source-ruby"><pre> <span class="pl-c"># have we identified the user?</span>
<span class="pl-k">if</span> <span class="pl-en">current_user</span>
<span class="pl-c"># check if the user has been banned</span>
<span class="pl-s1">user_block</span> <span class="pl-c1">=</span> <span class="pl-en">current_user</span><span class="pl-kos">.</span><span class="pl-en">blocks</span><span class="pl-kos">.</span><span class="pl-en">active</span><span class="pl-kos">.</span><span class="pl-en">take</span>
<span class="pl-k">unless</span> <span class="pl-s1">user_block</span><span class="pl-kos">.</span><span class="pl-en">nil?</span>
<span class="pl-en">set_locale</span>
<span class="pl-k">if</span> <span class="pl-s1">user_block</span><span class="pl-kos">.</span><span class="pl-en">zero_hour?</span>
<span class="pl-en">report_error</span> <span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-s">"application.setup_user_auth.blocked_zero_hour"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-pds">:forbidden</span>
<span class="pl-k">else</span>
<span class="pl-en">report_error</span> <span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-s">"application.setup_user_auth.blocked"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-pds">:forbidden</span>
<span class="pl-k">end</span>
<span class="pl-k">end</span></pre></div>
<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/issues/3522">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNUQX6TWRPJVFGFAI3VDR37JANCNFSM5STQOTDA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLO7OENW7FVYJXNFF4TVDR37JA5CNFSM5STQOTDKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RZDXHJQ.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/issues/3522</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/issues/3522",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3522",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>