1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class VirtualMachinesController < ApplicationController
7 @objects ||= model_class.all
9 if @objects.andand.first
10 Link.where(tail_uuid: current_user.uuid,
11 head_uuid: @objects.collect(&:uuid),
12 link_class: 'permission',
15 if perm_link.properties.andand[:username]
16 @vm_logins[perm_link.head_uuid] ||= []
17 @vm_logins[perm_link.head_uuid] << perm_link.properties[:username]
21 vm.current_user_logins = @vm_logins[vm.uuid].andand.compact || []
28 return render_not_found if not Rails.configuration.shell_in_a_box_url
29 @webshell_url = Rails.configuration.shell_in_a_box_url % {
31 hostname: @object.hostname,