<p></p>
<p dir="auto">I was considering whether we can move these authorization checks out of the authentication method (since authorization != authentication) and into the abilities (since we're already using CanCanCan as our authorization framework).</p>
<p dir="auto">The topic I haven't explored yet is how easy it will be to get the error messages correct, since if a user cannot edit it would be nice to know why (e.g. database offline, user block, user not yet active etc) and return an appropriate error message.</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/issues/3522#issuecomment-1095271444">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJLRZB2ODCKRCQJ6ZLVERHCTANCNFSM5STQOTDA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJFVYTTCXGZD3UTPZLVERHCTA5CNFSM5STQOTDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIFEIIFA.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/1095271444</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#issuecomment-1095271444",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/3522#issuecomment-1095271444",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>