4 As an admin, you can log in as this user. When you’ve
5 finished, you will need to log out and log in again with your
10 <%= button_to "Log in as #{@object.full_name}", sudo_user_url(id: @object.uuid), class: 'btn btn-primary' %>
14 As an admin, you can setup this user. Please input a VM and
15 repository for the user. If you had previously provided any of
16 these items, they are pre-filled for you and you can leave them
17 as is if you would like to reuse them.
21 <%= 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'} %>
25 As an admin, you can deactivate and reset this user. This will
26 remove all repository/VM permissions for the user. If you
27 "setup" the user again, the user will have to sign the user
32 <%= button_to "Deactivate #{@object.full_name}", unsetup_user_url(id: @object.uuid), class: 'btn btn-primary', data: {confirm: "Are you sure you want to deactivate #{@object.full_name}?"} %>
35 <div class="col-md-6">
36 <div class="panel panel-default">
37 <div class="panel-heading">
40 <div class="panel-body">
41 <div class="alert alert-info">
42 <b>Tip:</b> in most cases, you want <i>both permissions at once</i> for a given group.
44 The user→group permission is can_manage.
46 The group→user permission is can_read.
49 <% permitted_group_perms = {}
50 Link.limit(10000).filter([
51 ['tail_uuid', '=', @object.uuid],
52 ['head_uuid', 'is_a', 'arvados#group'],
53 ['link_class', '=', 'permission'],
55 permitted_group_perms[perm.head_uuid] = perm.uuid
57 <% member_group_perms = {}
58 Link.permissions_for(@object).each do |perm|
59 member_group_perms[perm.tail_uuid] = perm.uuid
61 <% Group.order(['name']).where(group_class: 'role').each do |group| %>
63 <label class="checkbox-inline" data-toggle-permission="true" data-permission-tail="<%= @object.uuid %>" data-permission-name="can_manage">
67 permitted_group_perms[group.uuid],
68 disabled: (group.owner_uuid == @object.uuid),
70 permission_head: group.uuid,
71 permission_uuid: permitted_group_perms[group.uuid]}) %>
72 <small>user→group</small>
74 <label class="checkbox-inline" data-toggle-permission="true" data-permission-head="<%= @object.uuid %>" data-permission-name="can_read">
78 member_group_perms[group.uuid],
79 disabled: (group.owner_uuid == @object.uuid),
81 permission_tail: group.uuid,
82 permission_uuid: member_group_perms[group.uuid]}) %>
83 <small>group→user</small>
85 <label class="checkbox-inline">
86 <%= group.name || '(unnamed)' %> <span class="deemphasize">(owned by <%= User.find(group.owner_uuid).andand.full_name %>)</span>
89 <% end.empty? and begin %>
96 <div class="panel-footer">
97 To manage these groups (roles), use:
99 <li><code>arv group create \<br/>--group '{"group_class":"role","name":"New group"}'</code></li>
100 <li><code>arv group list \<br/>--filters '[["group_class","=","role"]]' \<br/>--select '["uuid","name"]'</code></li>
101 <li><code>arv edit <i>uuid</i></code></li>
108 <div id="user-setup-modal-window" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>