1 package PMG
::API2
::Who
;
8 use PVE
::Tools
qw(extract_param);
9 use HTTP
::Status
qw(:constants);
10 use PVE
::JSONSchema
qw(get_standard_option);
16 use PMG
::RuleDB
::WhoRegex
;
17 use PMG
::RuleDB
::EMail
;
18 use PMG
::RuleDB
::IPAddress
;
19 use PMG
::RuleDB
::IPNet
;
20 use PMG
::RuleDB
::Domain
;
21 use PMG
::RuleDB
::LDAP
;
22 use PMG
::RuleDB
::LDAPUser
;
25 use base
qw(PVE::RESTHandler);
27 __PACKAGE__-
>register_method ({
31 description
=> "Directory index.",
32 permissions
=> { check
=> [ 'admin', 'audit' ] },
34 additionalProperties
=> 0,
37 description
=> "Object Group ID.",
47 subdir
=> { type
=> 'string'},
50 links
=> [ { rel
=> 'child', href
=> "{subdir}" } ],
56 { subdir
=> 'config' },
57 { subdir
=> 'objects' },
58 { subdir
=> 'email' },
59 { subdir
=> 'domain' },
60 { subdir
=> 'regex' },
62 { subdir
=> 'network' },
68 PMG
::API2
::ObjectGroupHelpers
::register_delete_object_group_api
(__PACKAGE__
, 'who', '');
69 PMG
::API2
::ObjectGroupHelpers
::register_object_group_config_api
(__PACKAGE__
, 'who', 'config');
70 PMG
::API2
::ObjectGroupHelpers
::register_objects_api
(__PACKAGE__
, 'who', 'objects');
72 PMG
::RuleDB
::EMail-
>register_api(__PACKAGE__
, 'email');
73 PMG
::RuleDB
::Domain-
>register_api(__PACKAGE__
, 'domain');
74 PMG
::RuleDB
::WhoRegex-
>register_api(__PACKAGE__
, 'regex');
75 PMG
::RuleDB
::IPAddress-
>register_api(__PACKAGE__
, 'ip');
76 PMG
::RuleDB
::IPNet-
>register_api(__PACKAGE__
, 'network');
77 PMG
::RuleDB
::LDAP-
>register_api(__PACKAGE__
, 'ldap');
78 PMG
::RuleDB
::LDAPUser-
>register_api(__PACKAGE__
, 'ldapuser');