X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/32002eb6e87a391d1fad2b1b206dbc74d6659fc5..bf9d2be7afcc640e18606fa8b9b2e0bc3f2190d1:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 308da7fa11..9442a6f0ee 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -107,6 +107,7 @@ class ArvadosModel < ActiveRecord::Base # If current user cannot write this object, just return # [self.owner_uuid]. def writable_by + return [owner_uuid] if not current_user unless (owner_uuid == current_user.uuid or current_user.is_admin or (current_user.groups_i_can(:manage) & [uuid, owner_uuid]).any?)