vm.login_permissions.each do |perm|
user_uuid = perm.tail_uuid
@users[user_uuid].andand.authorized_keys.andand.each do |ak|
- username = perm.properties.andand['username']
- if username
+ unless perm.properties['username'].blank?
@response << {
- username: username,
+ username: perm.properties['username'],
hostname: vm.hostname,
+ groups: (perm.properties["groups"].to_a rescue []),
public_key: ak.public_key,
user_uuid: user_uuid,
virtual_machine_uuid: vm.uuid,
end
end
end
- render json: { kind: "arvados#HashList", items: @response }
+ send_json kind: "arvados#HashList", items: @response
end
end