]> git.proxmox.com Git - pmg-api.git/commitdiff
api: quarantine: drop deprecated b/w-list methods
authorStoiko Ivanov <s.ivanov@proxmox.com>
Tue, 8 Jun 2021 17:22:17 +0000 (17:22 +0000)
committerStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 11 Jun 2021 14:53:45 +0000 (14:53 +0000)
in e8d909c11faeb5a4f84f39ef50e0eaf8ea65046d we introduced methods
which take the address to be deleted as parameter instead of path
component (local-parts can contain '/') - now we can drop the old
paths as indicated in 53e5e5da24ec13c49e9fdeffa9560833b28ad107

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/API2/Quarantine.pm

index 2fa1bb4d9b8e0afa34360966e5726072de56cf32..14f94c39fe5b278b83b51dd9e546571c68dc62dc 100644 (file)
@@ -305,34 +305,6 @@ __PACKAGE__->register_method ({
        return undef;
     }});
 
-# FIXME: remove for PMG 7.0 - addresses can contain stuff like '/' which breaks
-# API path resolution, thus we replaced it by above "un-templated" call
-__PACKAGE__->register_method ({
-    name => 'whitelist_delete',
-    path => 'whitelist/{address}',
-    method => 'DELETE',
-    description => "Delete user whitelist entries.",
-    permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
-    protected => 1,
-    parameters => {
-       additionalProperties => 0,
-       properties => {
-           pmail => $pmail_param_type,
-           address => get_standard_option('pmg-whiteblacklist-entry-list', {
-               description => "The address you want to remove.",
-           }),
-       },
-    },
-    returns => { type => 'null' },
-    code => sub {
-       my ($param) = @_;
-
-       my $addresses = [split(',', $param->{address})];
-       $read_or_modify_user_bw_list->('WL', $param, $addresses, 1);
-
-       return undef;
-    }});
-
 __PACKAGE__->register_method ({
     name => 'blacklist',
     path => 'blacklist',
@@ -415,33 +387,6 @@ __PACKAGE__->register_method ({
        return undef;
     }});
 
-# FIXME: remove for PMG 7.0 - addresses can contain stuff like '/' which breaks
-# API path resolution, thus we replaced it by above "un-templated" call
-__PACKAGE__->register_method ({
-    name => 'blacklist_delete',
-    path => 'blacklist/{address}',
-    method => 'DELETE',
-    description => "Delete user blacklist entries.",
-    permissions => { check => [ 'admin', 'qmanager', 'audit', 'quser'] },
-    protected => 1,
-    parameters => {
-       additionalProperties => 0,
-       properties => {
-           pmail => $pmail_param_type,
-           address => get_standard_option('pmg-whiteblacklist-entry-list', {
-               description => "The address you want to remove.",
-           }),
-       },
-    },
-    returns => { type => 'null' },
-    code => sub {
-       my ($param) = @_;
-
-       my $addresses = [split(',', $param->{address})];
-       $read_or_modify_user_bw_list->('BL', $param, $addresses, 1);
-
-       return undef;
-    }});
 
 __PACKAGE__->register_method ({
     name => 'spamusers',