[ARVADOS] updated: c4c188cdbe17d2fdfd6f14c0181876a78a2d4b2e

git at public.curoverse.com git at public.curoverse.com
Sun Aug 17 17:14:59 EDT 2014


Summary of changes:
 services/api/app/models/user.rb                                  | 2 +-
 services/api/test/functional/arvados/v1/users_controller_test.rb | 9 +++++++--
 2 files changed, 8 insertions(+), 3 deletions(-)

       via  c4c188cdbe17d2fdfd6f14c0181876a78a2d4b2e (commit)
      from  199e61ebf83ae9ee11d8da46adb4a8897d885504 (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 c4c188cdbe17d2fdfd6f14c0181876a78a2d4b2e
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Aug 17 17:14:35 2014 -0400

    3604: Fix user deactivation test.

diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index 158a8a4..19e84dc 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -167,7 +167,7 @@ class User < ArvadosModel
                      link_class: 'permission',
                      name: 'can_login')
 
-    # delete "All users' group read permissions for this user
+    # delete "All users" group read permissions for this user
     group = Group.where(name: 'All users').select do |g|
       g[:uuid].match /-f+$/
     end.first
diff --git a/services/api/test/functional/arvados/v1/users_controller_test.rb b/services/api/test/functional/arvados/v1/users_controller_test.rb
index 90399ca..1a8e94f 100644
--- a/services/api/test/functional/arvados/v1/users_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/users_controller_test.rb
@@ -735,8 +735,13 @@ class Arvados::V1::UsersControllerTest < ActionController::TestCase
     verify_link_existence response_user['uuid'], response_user['email'],
           false, false, false, false, false
 
-    assert_equal([], User.find_by_uuid(users(:active).uuid).groups_i_can(:read),
-                 "active user can still read some groups after being deactivated")
+    active_user = User.find_by_uuid(users(:active).uuid)
+    readable_groups = active_user.groups_i_can(:read)
+    all_users_group = Group.all.collect(&:uuid).select { |g| g.match /-f+$/ }
+    refute_includes(readable_groups, all_users_group,
+                    "active user can read All Users group after being deactivated")
+    assert_equal(false, active_user.is_invited,
+                 "active user is_invited after being deactivated & reloaded")
   end
 
   test "setup user with send notification param false and verify no email" do

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list