Commit b5d1e1ec authored by Fernando Verdugo's avatar Fernando Verdugo Committed by Francesc Guasch
Browse files

User experience access directly to virtual desktop if only has one machine (#1160)

feat(frontend): direct access if only one machine

Check number of machines
If user only has one clone, redirect to file.vv and open spice client

Issue #1145
parent b0bc3e5a
......@@ -1291,6 +1291,9 @@ sub login {
, locale => [@languages, @languages2]
my $machines = $RAVADA->list_machines_user($auth_ok);
$url = "/machine/display/". $machines->[0]->{id_clone}.".vv" if scalar(@$machines) == 1 && $machines->[0]->{id_clone};
$c->session(expiration => $expiration);
return $c->redirect_to($url);
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment