projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
5416: Allow users with repo write permission to update modified_at.
[arvados.git]
/
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 82dd0ec2b6177847f72460b87b492950b66a605a..b9442d64e78bf888741e9e47d532f53d73059e22 100644
(file)
--- 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.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?
end
def owner_uuid_changed?
self.user_id_changed?
@@
-80,6
+80,10
@@
class ApiClientAuthorization < ArvadosModel
attrs
end
attrs
end
+ def self.default_orders
+ ["#{table_name}.id desc"]
+ end
+
protected
def permission_to_create
protected
def permission_to_create