[ARVADOS] updated: 0558601e48e0440887ae597a64c314676bb1e138

git at public.curoverse.com git at public.curoverse.com
Mon Jun 2 16:06:48 EDT 2014


Summary of changes:
 services/api/app/controllers/arvados/v1/groups_controller.rb | 7 ++++---
 services/api/app/models/link.rb                              | 8 ++++++++
 2 files changed, 12 insertions(+), 3 deletions(-)

       via  0558601e48e0440887ae597a64c314676bb1e138 (commit)
       via  902ff4f1b2c139d7637abeabb610e7e0d0858c0c (commit)
      from  f6235f6bbe13b61b298d07bedb75ba645d69ed15 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 0558601e48e0440887ae597a64c314676bb1e138
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jun 2 15:14:15 2014 -0400

    2872: Change default order of folder contents. refs #2872

diff --git a/services/api/app/controllers/arvados/v1/groups_controller.rb b/services/api/app/controllers/arvados/v1/groups_controller.rb
index 4bccbcc..da82e81 100644
--- a/services/api/app/controllers/arvados/v1/groups_controller.rb
+++ b/services/api/app/controllers/arvados/v1/groups_controller.rb
@@ -20,9 +20,10 @@ class Arvados::V1::GroupsController < ApplicationController
     offset_all = @offset
     @orders = []
 
-    [Group, Job, PipelineInstance, PipelineTemplate,
-     Human, Specimen, Trait,
-     Collection].each do |klass|
+    [Group,
+     Job, PipelineInstance, PipelineTemplate,
+     Collection,
+     Human, Specimen, Trait].each do |klass|
       @objects = klass.readable_by(*@read_users)
       cond_sql = "#{klass.table_name}.owner_uuid = ?"
       cond_params = [@object.uuid]

commit 902ff4f1b2c139d7637abeabb610e7e0d0858c0c
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Jun 2 15:13:52 2014 -0400

    2872: Ensure name link tail_uuid == owner_uuid. refs #2872

diff --git a/services/api/app/models/link.rb b/services/api/app/models/link.rb
index af39185..1b3fc34 100644
--- a/services/api/app/models/link.rb
+++ b/services/api/app/models/link.rb
@@ -10,6 +10,7 @@ class Link < ArvadosModel
   after_destroy :maybe_invalidate_permissions_cache
   attr_accessor :head_kind, :tail_kind
   validate :name_link_has_valid_name
+  validate :name_link_owner_is_tail
 
   api_accessible :user, extend: :common do |t|
     t.add :tail_uuid
@@ -92,4 +93,11 @@ class Link < ArvadosModel
       true
     end
   end
+
+  def name_link_owner_is_tail
+    if link_class == 'name'
+      self.owner_uuid = tail_uuid
+      ensure_owner_uuid_is_permitted
+    end
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list