X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a6439c7ddc3407193889386051f06df2a1e74ea9..27697133a18371d692d69569659dd522e7b0fbdd:/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