[ARVADOS] updated: 84decc8949fc51ec2eaf906fc2c4cbbb3df807dd

git at public.curoverse.com git at public.curoverse.com
Thu May 22 04:27:35 EDT 2014


Summary of changes:
 apps/workbench/app/models/arvados_base.rb | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

       via  84decc8949fc51ec2eaf906fc2c4cbbb3df807dd (commit)
      from  5aac4c685edaa685c255dcf79aefde46c267e6d7 (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 84decc8949fc51ec2eaf906fc2c4cbbb3df807dd
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu May 22 04:27:09 2014 -0400

    2760: Make editable? follow permissions obtained via groups/folders.

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index 00e4dc1..7d86037 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -293,7 +293,8 @@ class ArvadosBase < ActiveRecord::Base
     (current_user and current_user.is_active and
      (current_user.is_admin or
       current_user.uuid == self.owner_uuid or
-      new_record?))
+      new_record? or
+      (writable_by.include? current_user.uuid rescue false)))
   end
 
   def attribute_editable?(attr)
@@ -301,12 +302,10 @@ class ArvadosBase < ActiveRecord::Base
       false
     elsif not (current_user.andand.is_active)
       false
-    elsif "uuid owner_uuid".index(attr.to_s) or current_user.is_admin
+    elsif attr == 'uuid'
       current_user.is_admin
     else
-      current_user.uuid == self.owner_uuid or
-        current_user.uuid == self.uuid or
-        new_record?
+      editable?
     end
   end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list