Skip to content

Commit

Permalink
Feat: share machine (#2021)
Browse files Browse the repository at this point in the history
feat: share machine with another user
* allow also shutdown
* allow reboot when shared access
* allow shared users view,start && edit
  • Loading branch information
frankiejol authored Feb 6, 2024
1 parent 298fc4f commit fac45d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion script/rvd_front
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
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 fac45d2

Please sign in to comment.