diff --git a/script/rvd_front b/script/rvd_front index c49b9850c..23369e6ec 100644 --- a/script/rvd_front +++ b/script/rvd_front @@ -1077,7 +1077,7 @@ get '/machine/view/(:id).(:type)' => sub { return view_machine($c) if $USER->is_admin || $USER->can_view_all; - if ( $domain->id_owner == $USER->id ) { + if ( $domain->id_owner == $USER->id || $USER->can_start_machine($domain) ) { if ( $domain->id_base) { my $base = Ravada::Front::Domain->open($domain->id_base); if ($base->is_public || $base->show_clones()) { diff --git a/t/lib/Test/Ravada.pm b/t/lib/Test/Ravada.pm index 7ac192c18..7fab080b0 100644 --- a/t/lib/Test/Ravada.pm +++ b/t/lib/Test/Ravada.pm @@ -953,7 +953,7 @@ sub mojo_clean($wait=1) { sub mojo_check_login( $t, $user=$MOJO_USER , $pass=$MOJO_PASSWORD ) { $t->ua->get("/user.json"); - return if $t->tx->res->code =~ /^(101|200|302)$/; + return if $t->tx && $t->tx->res->code =~ /^(101|200|302)$/; mojo_login($t, $user,$pass); }