]> git.proxmox.com Git - pve-manager.git/commitdiff
api: nodes: remove deprecated upgrade parameter for spiceshell
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 4 Jun 2021 13:49:40 +0000 (15:49 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 9 Jun 2021 08:51:53 +0000 (10:51 +0200)
The change not to pass the 'upgrade' parameter in the frontend was made in
953f6e9bb3ab31ad074f1040d7143ecfa79e11e8 (the commit doesn't talk about it, it's
likely an accidental squash of two changes)

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/API2/Nodes.pm

index 36cb70b4af98003b111cde11ca0904b4c665f4d2..7feb5662f7b1ca56b37f01fda087ba6ade4e50ba 100644 (file)
@@ -1187,12 +1187,6 @@ __PACKAGE__->register_method ({
        properties => {
            node => get_standard_option('pve-node'),
            proxy => get_standard_option('spice-proxy', { optional => 1 }),
-           upgrade => {
-               type => 'boolean',
-               description => "Deprecated, use the 'cmd' property instead! Run 'apt-get dist-upgrade' instead of normal shell.",
-               optional => 1,
-               default => 0,
-           },
            cmd => {
                type => 'string',
                description => "Run specific command or default to login.",
@@ -1219,17 +1213,17 @@ __PACKAGE__->register_method ({
        my ($user, undef, $realm) = PVE::AccessControl::verify_username($authuser);
 
        raise_perm_exc("realm != pam") if $realm ne 'pam';
-       raise_perm_exc('user != root@pam') if $param->{upgrade} && $user ne 'root@pam';
+
+       if (defined($param->{cmd}) && $param->{cmd} eq 'upgrade' && $user ne 'root@pam') {
+           raise_perm_exc('user != root@pam');
+       }
 
        my $node = $param->{node};
        my $proxy = $param->{proxy};
 
        my $authpath = "/nodes/$node";
        my $permissions = 'Sys.Console';
-       # FIXME: remove with 6.0
-       if ($param->{upgrade}) {
-           $param->{cmd} = 'upgrade';
-       }
+
        my $shcmd = get_shell_command($user, $param->{cmd}, $param->{'cmd-opts'});
 
        my $title = "Shell on '$node'";