[ARVADOS] updated: 397191893819083925600a61e2f355a3b6513354

git at public.curoverse.com git at public.curoverse.com
Thu Apr 16 10:18:41 EDT 2015


Summary of changes:
 services/api/app/models/user.rb     | 2 +-
 services/api/test/unit/user_test.rb | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

       via  397191893819083925600a61e2f355a3b6513354 (commit)
      from  d2e7a97c8d24ef8ae61d860e9c972626f80cf2b4 (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 397191893819083925600a61e2f355a3b6513354
Author: Brett Smith <brett at curoverse.com>
Date:   Thu Apr 16 10:18:26 2015 -0400

    5742: User setup process uses username for VM login, not repo name.
    
    Closes #5742.

diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb
index fe5e07b..2200d05 100644
--- a/services/api/app/models/user.rb
+++ b/services/api/app/models/user.rb
@@ -194,7 +194,7 @@ class User < ArvadosModel
   def setup_repo_vm_links(repo_name, vm_uuid, openid_prefix)
     oid_login_perm = create_oid_login_perm openid_prefix
     repo_perm = create_user_repo_link repo_name
-    vm_login_perm = create_vm_login_permission_link vm_uuid, repo_name
+    vm_login_perm = create_vm_login_permission_link vm_uuid, username
     group_perm = create_user_group_link
 
     return [oid_login_perm, repo_perm, vm_login_perm, group_perm, self].compact
diff --git a/services/api/test/unit/user_test.rb b/services/api/test/unit/user_test.rb
index 45dd186..b96645c 100644
--- a/services/api/test/unit/user_test.rb
+++ b/services/api/test/unit/user_test.rb
@@ -457,6 +457,7 @@ class UserTest < ActiveSupport::TestCase
 
     vm_perm = find_obj_in_resp response, 'Link', 'arvados#virtualMachine'
     verify_link vm_perm, 'permission', 'can_login', resp_user[:uuid], vm.uuid
+    assert_equal("foo", vm_perm.properties["username"])
   end
 
   test "setup new user with junk in database" do
@@ -499,6 +500,7 @@ class UserTest < ActiveSupport::TestCase
 
     vm_perm = find_obj_in_resp response, 'Link', 'arvados#virtualMachine'
     verify_link vm_perm, 'permission', 'can_login', resp_user[:uuid], vm.uuid
+    assert_equal("foo", vm_perm.properties["username"])
   end
 
   test "setup new user in multiple steps" do
@@ -552,6 +554,7 @@ class UserTest < ActiveSupport::TestCase
 
     vm_perm = find_obj_in_resp response, 'Link', 'arvados#virtualMachine'
     verify_link vm_perm, 'permission', 'can_login', resp_user[:uuid], vm.uuid
+    assert_equal("foo", vm_perm.properties["username"])
   end
 
   def find_obj_in_resp (response_items, object_type, head_kind=nil)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list