6013: remove "repository" from user setup popup in workbench
authorradhika <radhika@curoverse.com>
Fri, 3 Jul 2015 19:44:26 +0000 (15:44 -0400)
committerradhika <radhika@curoverse.com>
Fri, 3 Jul 2015 19:44:26 +0000 (15:44 -0400)
apps/workbench/app/controllers/users_controller.rb
apps/workbench/app/views/users/_setup_popup.html.erb
apps/workbench/app/views/users/_show_admin.html.erb
apps/workbench/test/integration/users_test.rb

index 2f513655b6e9424374f0ed90d559acc9a711d236..4cf1fffc09bb3e3a815311f86c2550bbe16e5f3d 100644 (file)
@@ -208,9 +208,6 @@ class UsersController < ApplicationController
         if params['openid_prefix'] && params['openid_prefix'].size>0
           setup_params[:openid_prefix] = params['openid_prefix']
         end
-        if params['repo_name'] && params['repo_name'].size>0
-          setup_params[:repo_name] = params['repo_name']
-        end
         if params['vm_uuid'] && params['vm_uuid'].size>0
           setup_params[:vm_uuid] = params['vm_uuid']
         end
index 7432b81a6924f23d538a38cb0ca790093cc58730..36869cde2f52ba30e1b75a7993e3697f3b2e7529 100644 (file)
@@ -7,7 +7,7 @@
     <div class="modal-header">
       <button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">&times;</button>
       <div>
-        <div class="col-sm-6"> <h4 class="modal-title">Setup User</h4> </div>
+        <div class="col-sm-6"> <h4 class="modal-title">Setup Shell Account</h4> </div>
         <div class="spinner spinner-32px spinner-h-center col-sm-1" hidden="true"></div>
       </div>
       <br/>
@@ -21,7 +21,6 @@
       <% disable_email = uuid != nil %>
       <% identity_url_prefix = @current_selections[:identity_url_prefix] %>
       <% disable_url_prefix = identity_url_prefix != nil %>
-      <% selected_repo = @current_selections[:repo_name] %>
       <% selected_vm = @current_selections[:vm_uuid] %>
       <% groups = @current_selections[:groups] %>
 
                value="<%= Rails.configuration.default_openid_prefix %>">
         <% end %>
       </div>
-      <div class="form-group">
-        <label for="repo_name">Repository Name and Shell Login</label>
-        <input class="form-control" id="repo_name" maxlength="250" name="repo_name" type="text" value="<%=selected_repo%>">
-      </div>
       <div class="form-group">
         <label for="vm_uuid">Virtual Machine</label>
         <select class="form-control" name="vm_uuid">
index a34d7e6949ba1df3f9073896db5d2e61a67a9be8..0dd72037373788109f717747748da534488fcf27 100644 (file)
     </blockquote>
 
     <p>
-      As an admin, you can setup this user. Please input a VM and
-      repository for the user. If you had previously provided any of
-      these items, they are pre-filled for you and you can leave them
-      as is if you would like to reuse them.
+      As an admin, you can setup a shell account for this user.
+      The login name is automatically generated from the user's e-mail address.
     </p>
 
     <blockquote>
-      <%= link_to "Setup #{@object.full_name}", setup_popup_user_url(id: @object.uuid),  {class: 'btn btn-primary', :remote => true, 'data-toggle' =>  "modal", 'data-target' => '#user-setup-modal-window'}  %>
+      <%= link_to "Setup shell account #{'for ' if @object.full_name.present?} #{@object.full_name}", setup_popup_user_url(id: @object.uuid),  {class: 'btn btn-primary', :remote => true, 'data-toggle' =>  "modal", 'data-target' => '#user-setup-modal-window'}  %>
     </blockquote>
 
     <p>
       As an admin, you can deactivate and reset this user. This will
-      remove all repository/VM permissions for the user. If you
+      remove all VM permissions for the user. If you
       "setup" the user again, the user will have to sign the user
       agreement again.
     </p>
index d57bdea72d7cf49c1721d737bfa63d412446de59..db670815d83ca1ca86816c859191dbce9dd52660 100644 (file)
@@ -56,7 +56,6 @@ class UsersTest < ActionDispatch::IntegrationTest
     within '.modal-content' do
       find 'label', text: 'Virtual Machine'
       fill_in "email", :with => "foo@example.com"
-      fill_in "repo_name", :with => "newtestrepo"
       click_button "Submit"
       wait_for_ajax
     end
@@ -81,7 +80,6 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? 'Repository: foo/newtestrepo'
     assert !(page.has_text? 'VirtualMachine:')
   end
 
@@ -102,11 +100,10 @@ class UsersTest < ActionDispatch::IntegrationTest
     click_link 'Admin'
     assert page.has_text? 'As an admin, you can setup'
 
-    click_link 'Setup Active User'
+    click_link 'Setup shell account for Active User'
 
     within '.modal-content' do
       find 'label', text: 'Virtual Machine'
-      fill_in "repo_name", :with => "activetestrepo"
       click_button "Submit"
     end
 
@@ -115,17 +112,15 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? 'Repository: active/activetestrepo'
     vm_links = all("a", text: "VirtualMachine:")
     assert_equal(1, vm_links.size)
     assert_equal("VirtualMachine: testvm2.shell", vm_links.first.text)
 
     # Click on Setup button again and this time also choose a VM
     click_link 'Admin'
-    click_link 'Setup Active User'
+    click_link 'Setup shell account for Active User'
 
     within '.modal-content' do
-      fill_in "repo_name", :with => "activetestrepo2"
       select("testvm.shell", :from => 'vm_uuid')
       fill_in "groups", :with => "test group one, test-group-two"
       click_button "Submit"
@@ -136,7 +131,6 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? 'Repository: active/activetestrepo2'
     assert page.has_text? 'VirtualMachine: testvm.shell'
     assert page.has_text? '["test group one", "test-group-two"]'
   end
@@ -185,15 +179,13 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_no_text? 'Repository: active/'
     assert page.has_no_text? 'VirtualMachine: testvm.shell'
 
     # setup user again and verify links present
     click_link 'Admin'
-    click_link 'Setup Active User'
+    click_link 'Setup shell account for Active User'
 
     within '.modal-content' do
-      fill_in "repo_name", :with => "activetestrepo"
       select("testvm.shell", :from => 'vm_uuid')
       click_button "Submit"
     end
@@ -203,7 +195,6 @@ class UsersTest < ActionDispatch::IntegrationTest
 
     click_link 'Advanced'
     click_link 'Metadata'
-    assert page.has_text? 'Repository: active/activetestrepo'
     assert page.has_text? 'VirtualMachine: testvm.shell'
   end