Merge branch '4027-api-sdk-version-wip'
[arvados.git] / services / api / app / models / arvados_model.rb
index 422ce01e1c598cee05b2a5cc9fe766d36a92214e..13ccd7033560318c2db2687928a08a4e5de0d44e 100644 (file)
@@ -110,7 +110,8 @@ class ArvadosModel < ActiveRecord::Base
     unless (owner_uuid == current_user.uuid or
             current_user.is_admin or
             (current_user.groups_i_can(:manage) & [uuid, owner_uuid]).any?)
-      if (current_user.groups_i_can(:write) & [uuid, owner_uuid]).any?
+      if ((current_user.groups_i_can(:write) + [current_user.uuid]) &
+          [uuid, owner_uuid]).any?
         return [owner_uuid, current_user.uuid]
       else
         return [owner_uuid]