X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f2574ec2e4ddef03c9504cd58741e73426ea1b17..b69a0b0f7b4b9a773fb060a592057f9bd146e480:/apps/workbench/app/views/users/_show_admin.html.erb diff --git a/apps/workbench/app/views/users/_show_admin.html.erb b/apps/workbench/app/views/users/_show_admin.html.erb index f667f388bd..ddff79be01 100644 --- a/apps/workbench/app/views/users/_show_admin.html.erb +++ b/apps/workbench/app/views/users/_show_admin.html.erb @@ -1,23 +1,117 @@ -

As an admin, you can log in as this user. When you’ve -finished, you will need to log out and log in again with your own -account.

+<%# Copyright (C) The Arvados Authors. All rights reserved. -
-<%= button_to "Log in as #{@object.full_name}", sudo_user_url(id: @object.uuid), class: 'btn btn-primary' %> -
+SPDX-License-Identifier: AGPL-3.0 %> -

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 log in as this user. When you’ve + finished, you will need to log out and log in again with your + own account. +

-
-<%= 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'} %> -
+
+ <%= button_to "Log in as #{@object.full_name}", sudo_user_url(id: @object.uuid), class: 'btn btn-primary' %> +
-

As an admin, you can deactivate and reset this user. This will remove all repository/VM permissions for the user. If you "setup" the user again, the user will have to sign the user agreement again.

+

+ 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. +

-
-<%= 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}?"} %> -
+
+ <%= 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'} %> +
+ +

+ As an admin, you can deactivate and reset this user. This will + remove all repository/VM permissions for the user. If you + "setup" the user again, the user will have to sign the user + agreement again. +

+ +
+ <%= 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}?"} %> +
+
+
+
+
+ Group memberships + +
+ <%= link_to raw(' Add new group'), "#", + {class: 'btn btn-xs btn-primary', 'data-toggle' => "modal", + 'data-target' => '#add-group-modal'} %> +
+
+
+
+ Tip: in most cases, you want both permissions at once for a given group. +
+ The user→group permission is can_manage. +
+ The group→user permission is can_read. +
+
+ <% permitted_group_perms = {} + Link.filter([ + ['tail_uuid', '=', @object.uuid], + ['head_uuid', 'is_a', 'arvados#group'], + ['link_class', '=', 'permission'], + ]).each do |perm| + permitted_group_perms[perm.head_uuid] = perm.uuid + end %> + <% member_group_perms = {} + Link.permissions_for(@object).each do |perm| + member_group_perms[perm.tail_uuid] = perm.uuid + end %> + <% Group.order(['name']).where(group_class: 'role').each do |group| %> +
+ + + +
+ <% end.empty? and begin %> +
+ (No groups defined.) +
+ <% end %> +
+
+ +
+
+
-<% content_for :footer_html do %> -<% end %> +<%= render partial: "add_group_modal" %>