[openstreetmap/openstreetmap-website] Remove OAuth 1 ApiCapability user branch (PR #5152)
Anton Khorev
notifications at github.com
Thu Sep 5 20:26:43 UTC 2024
@AntonKhorev commented on this pull request.
> @@ -5,11 +5,7 @@ class ApiCapability
def initialize(token)
if Settings.status != "database_offline"
- user = if token.respond_to?(:resource_owner_id)
- User.find(token.resource_owner_id)
- elsif token.respond_to?(:user)
- token.user
- end
+ user = (User.find(token.resource_owner_id) if token.respond_to?(:resource_owner_id))
Removed that part of the test because you don't have any abilities by default and it only tested `cannot?`.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5152#discussion_r1746118977
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5152/review/2284015620 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240905/729c0d48/attachment-0001.htm>
More information about the rails-dev
mailing list