X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/66d12ae6dc72d45cc3cb3fcc007cb41371371616..e32805af332dfdbb973979482e25bc5466236821:/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