Skip to content

Commit

Permalink
wip: fixed conflicts with show clones feature
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Feb 6, 2024
1 parent e096f0e commit 9fbe40b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions script/rvd_front
Original file line number Diff line number Diff line change
Expand Up @@ -1075,10 +1075,9 @@ get '/machine/view/(:id).(:type)' => sub {
return access_denied($c) if !$domain;

return view_machine($c) if $USER->is_admin
|| $USER->can_view_all
|| $USER->can_start_machine($domain);
|| $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()) {
Expand Down
2 changes: 1 addition & 1 deletion t/lib/Test/Ravada.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9fbe40b

Please sign in to comment.