[openstreetmap/openstreetmap-website] Merge ApiCapability class into ApiAbility (PR #5429)
Anton Khorev
notifications at github.com
Fri Dec 20 15:42:16 UTC 2024
@AntonKhorev commented on this pull request.
> @@ -64,11 +64,7 @@ def authorize(errormessage = "Couldn't authenticate you")
def current_ability
# Use capabilities from the oauth token if it exists and is a valid access token
- if doorkeeper_token&.accessible?
- ApiAbility.new(nil).merge(ApiCapability.new(doorkeeper_token))
- else
- ApiAbility.new(current_user)
- end
+ ApiAbility.new((doorkeeper_token if doorkeeper_token&.accessible?))
restored `if`
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5429#discussion_r1894089558
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5429/review/2517816313 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241220/75e58f4b/attachment.htm>
More information about the rails-dev
mailing list