X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e8f81804c24307b6702b1897c80b4be832254454..1a0a58c4f22af82e0a37440af3b0948771bca5e1:/services/api/app/models/api_client_authorization.rb diff --git a/services/api/app/models/api_client_authorization.rb b/services/api/app/models/api_client_authorization.rb index 2488d8322f..5817ff6648 100644 --- a/services/api/app/models/api_client_authorization.rb +++ b/services/api/app/models/api_client_authorization.rb @@ -30,7 +30,7 @@ class ApiClientAuthorization < ArvadosModel self.user.andand.uuid end def owner_uuid_was - self.user_id_changed? ? User.find(self.user_id_was).andand.uuid : self.user.andand.uuid + self.user_id_changed? ? User.where(id: self.user_id_was).first.andand.uuid : self.user.andand.uuid end def owner_uuid_changed? self.user_id_changed? @@ -71,7 +71,7 @@ class ApiClientAuthorization < ArvadosModel end def scopes_allow_request?(request) - scopes_allow? [request.method, request.path].join(' ') + scopes_allow? [request.request_method, request.path].join(' ') end def logged_attributes