From: Peter Amstutz Date: Fri, 11 Apr 2014 13:44:13 +0000 (-0400) Subject: Merged master X-Git-Tag: 1.1.0~2690^2~19^2~7 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/4f552c0187f8c31d94ff74485c57ef7f9888597e Merged master --- 4f552c0187f8c31d94ff74485c57ef7f9888597e diff --cc services/api/app/models/user.rb index 5c15fa2330,5c03eda519..41858e8b3a --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@@ -79,10 -80,10 +80,11 @@@ class User < ArvadosMode Group.where('owner_uuid in (?)', lookup_uuids).each do |group| newgroups << [group.owner_uuid, group.uuid, 'can_manage'] end - Link.where('tail_uuid in (?) and link_class = ? and head_uuid like ?', - Link.where('tail_uuid in (?) and link_class = ? and head_kind in (?)', ++ Link.where('tail_uuid in (?) and link_class = ? and (head_uuid like ? or head_uuid like ?)', lookup_uuids, 'permission', - Group.uuid_like_pattern).each do |link| - ['arvados#group', 'arvados#user']).each do |link| ++ Group.uuid_like_pattern, ++ User.uuid_like_pattern).each do |link| newgroups << [link.tail_uuid, link.head_uuid, link.name] end newgroups.each do |tail_uuid, head_uuid, perm_name| diff --cc services/api/test/fixtures/links.yml index 523c466f4e,0342d3d1aa..47de7e5abc --- a/services/api/test/fixtures/links.yml +++ b/services/api/test/fixtures/links.yml @@@ -9,7 -9,9 +9,7 @@@ user_agreement_required tail_uuid: zzzzz-tpzed-000000000000000 link_class: signature name: require - head_uuid: b519d9cb706a29fc7ea24dbea2f05851+93 - head_kind: arvados#collection + head_uuid: b519d9cb706a29fc7ea24dbea2f05851+249025 properties: {} user_agreement_readable: @@@ -23,7 -25,9 +23,7 @@@ tail_uuid: zzzzz-j7d0g-fffffffffffffff link_class: permission name: can_read - head_uuid: b519d9cb706a29fc7ea24dbea2f05851+93 - head_kind: arvados#collection + head_uuid: b519d9cb706a29fc7ea24dbea2f05851+249025 properties: {} active_user_member_of_all_users_group: @@@ -65,7 -73,9 +65,7 @@@ user_agreement_signed_by_active tail_uuid: zzzzz-tpzed-xurymjxw79nv3jz link_class: signature name: click - head_uuid: b519d9cb706a29fc7ea24dbea2f05851+93 - head_kind: arvados#collection + head_uuid: b519d9cb706a29fc7ea24dbea2f05851+249025 properties: {} user_agreement_signed_by_inactive: @@@ -79,7 -89,9 +79,7 @@@ tail_uuid: zzzzz-tpzed-7sg468ezxwnodxs link_class: signature name: click - head_uuid: b519d9cb706a29fc7ea24dbea2f05851+93 - head_kind: arvados#collection + head_uuid: b519d9cb706a29fc7ea24dbea2f05851+249025 properties: {} spectator_user_member_of_all_users_group: