1 class ManageAccountController < ApplicationController
12 # repositories current user can read / write
14 Link.where(tail_uuid: current_user.uuid,
15 link_class: 'permission',
16 name: ['can_write', 'can_read']).
18 @repo_links << perm_link[:head_uuid]
20 @repositories = Repository.where(uuid: @repo_links)
22 # virtual machines the current user can login into
24 Link.where(tail_uuid: current_user.uuid,
25 link_class: 'permission',
28 if perm_link.properties.andand[:username]
29 @vm_logins[perm_link.head_uuid] ||= []
30 @vm_logins[perm_link.head_uuid] << perm_link.properties[:username]
33 @virtual_machines = VirtualMachine.where(uuid: @vm_logins.keys)
35 # current user's ssh keys
36 filters=[["owner_uuid", "=", current_user.uuid]]
37 @ssh_keys = AuthorizedKey.where(key_type: 'SSH', filters: filters)