Commit 0c5817ae authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge branch 'robertperez-upc-feat/cool_new_branch'

parent 4f67274d
......@@ -143,8 +143,6 @@ sub list_machines_user($self, $user, $access_data={}) {
my @list;
while ( $sth->fetch ) {
next if !$is_public && !$user->is_admin && (($typeof) || ($user->id != $id_owner));
next if !$user->allowed_access($id);
# check if enabled settings and this user not allowed
next if $bookings_enabled && !Ravada::Front::Domain->open($id)->allowed_booking($user);
......
......@@ -3007,6 +3007,11 @@ sub copy_machine {
$owner = undef if (! $USER) || (! $USER->is_admin);
confess "owner do not exists" if ($owner) && (! Ravada::Auth::SQL->new(name => $owner));
$USER = _logged_in($c);
my $owner = $arg->{new_owner};
$owner = undef if (! $USER) || (! $USER->is_admin);
confess "owner do not exists" if ($owner) && (! Ravada::Auth::SQL->new(name => $owner));
my @create_args = ( from_pool => 0 );
push @create_args,( memory => $ram ) if $ram;
push @create_args, ( name => $name ) if !defined $number || $number == 1;
......
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