]> git.proxmox.com Git - pve-container.git/commitdiff
fix #1225: restore without config changes for VMUser
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 15 Dec 2016 15:10:55 +0000 (16:10 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 19 Dec 2016 08:57:25 +0000 (09:57 +0100)
this makes the behaviour similar to VM restore operations

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/API2/LXC.pm

index 423c90eb92194c2907fa14dfc1f5731bc3369850..cb8df4a496b7b1d6101efb91da890ef85250cb32 100644 (file)
@@ -218,13 +218,13 @@ __PACKAGE__->register_method({
            raise_perm_exc();
        }
 
-       PVE::LXC::check_ct_modify_config_perm($rpcenv, $authuser, $vmid, $pool, $param, []);
-
+       my $ostemplate = extract_param($param, 'ostemplate');
        my $storage = extract_param($param, 'storage') // 'local';
 
+       PVE::LXC::check_ct_modify_config_perm($rpcenv, $authuser, $vmid, $pool, $param, []);
+
        my $storage_cfg = cfs_read_file("storage.cfg");
 
-       my $ostemplate = extract_param($param, 'ostemplate');
 
        my $archive;