<div class="modal-header">
<button type="button" class="close" onClick="reset_form()" data-dismiss="modal" aria-hidden="true">×</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/>
<% 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">
</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>
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
click_link 'Advanced'
click_link 'Metadata'
- assert page.has_text? 'Repository: foo/newtestrepo'
assert !(page.has_text? 'VirtualMachine:')
end
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
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"
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
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
click_link 'Advanced'
click_link 'Metadata'
- assert page.has_text? 'Repository: active/activetestrepo'
assert page.has_text? 'VirtualMachine: testvm.shell'
end