mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-29 16:40:13 +00:00
pveum: introduce sub-commands
use a sub-command structure instead of abbreviated words, where useful. Keep old commands as aliases. Signed-off-by: Philip Abernethy <p.abernethy@proxmox.com> Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com> Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
52192dd4ca
commit
1e41cdc903
@ -38,6 +38,25 @@ sub read_password {
|
|||||||
}
|
}
|
||||||
|
|
||||||
our $cmddef = {
|
our $cmddef = {
|
||||||
|
user => {
|
||||||
|
add => [ 'PVE::API2::User', 'create_user', ['userid'] ],
|
||||||
|
modify => [ 'PVE::API2::User', 'update_user', ['userid'] ],
|
||||||
|
delete => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
|
||||||
|
},
|
||||||
|
group => {
|
||||||
|
add => [ 'PVE::API2::Group', 'create_group', ['groupid'] ],
|
||||||
|
modify => [ 'PVE::API2::Group', 'update_group', ['groupid'] ],
|
||||||
|
delete => [ 'PVE::API2::Group', 'delete_group', ['groupid'] ],
|
||||||
|
},
|
||||||
|
role => {
|
||||||
|
add => [ 'PVE::API2::Role', 'create_role', ['roleid'] ],
|
||||||
|
modify => [ 'PVE::API2::Role', 'update_role', ['roleid'] ],
|
||||||
|
delete => [ 'PVE::API2::Role', 'delete_role', ['roleid'] ],
|
||||||
|
},
|
||||||
|
acl => {
|
||||||
|
modify => [ 'PVE::API2::ACL', 'update_acl', ['path'], { delete => 0 }],
|
||||||
|
delete => [ 'PVE::API2::ACL', 'update_acl', ['path'], { delete => 1 }],
|
||||||
|
},
|
||||||
ticket => [ 'PVE::API2::AccessControl', 'create_ticket', ['username'], undef,
|
ticket => [ 'PVE::API2::AccessControl', 'create_ticket', ['username'], undef,
|
||||||
sub {
|
sub {
|
||||||
my ($res) = @_;
|
my ($res) = @_;
|
||||||
@ -46,20 +65,20 @@ our $cmddef = {
|
|||||||
|
|
||||||
passwd => [ 'PVE::API2::AccessControl', 'change_passsword', ['userid'] ],
|
passwd => [ 'PVE::API2::AccessControl', 'change_passsword', ['userid'] ],
|
||||||
|
|
||||||
useradd => [ 'PVE::API2::User', 'create_user', ['userid'] ],
|
useradd => { alias => 'user add' },
|
||||||
usermod => [ 'PVE::API2::User', 'update_user', ['userid'] ],
|
usermod => { alias => 'user modify' },
|
||||||
userdel => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
|
userdel => { alias => 'user delete' },
|
||||||
|
|
||||||
groupadd => [ 'PVE::API2::Group', 'create_group', ['groupid'] ],
|
groupadd => { alias => 'group add' },
|
||||||
groupmod => [ 'PVE::API2::Group', 'update_group', ['groupid'] ],
|
groupmod => { alias => 'group modify' },
|
||||||
groupdel => [ 'PVE::API2::Group', 'delete_group', ['groupid'] ],
|
groupdel => { alias => 'group delete' },
|
||||||
|
|
||||||
roleadd => [ 'PVE::API2::Role', 'create_role', ['roleid'] ],
|
roleadd => { alias => 'role add' },
|
||||||
rolemod => [ 'PVE::API2::Role', 'update_role', ['roleid'] ],
|
rolemod => { alias => 'role modify' },
|
||||||
roledel => [ 'PVE::API2::Role', 'delete_role', ['roleid'] ],
|
roledel => { alias => 'role delete' },
|
||||||
|
|
||||||
aclmod => [ 'PVE::API2::ACL', 'update_acl', ['path'], { delete => 0 }],
|
aclmod => { alias => 'acl modify' },
|
||||||
acldel => [ 'PVE::API2::ACL', 'update_acl', ['path'], { delete => 1 }],
|
acldel => { alias => 'acl delete' },
|
||||||
};
|
};
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
2
debian/control
vendored
2
debian/control
vendored
@ -21,7 +21,7 @@ Depends: libauthen-pam-perl,
|
|||||||
libmime-base32-perl,
|
libmime-base32-perl,
|
||||||
libnet-ldap-perl,
|
libnet-ldap-perl,
|
||||||
libnet-ssleay-perl,
|
libnet-ssleay-perl,
|
||||||
libpve-common-perl,
|
libpve-common-perl (>= 5.0-27),
|
||||||
libterm-readline-gnu-perl,
|
libterm-readline-gnu-perl,
|
||||||
liburi-perl,
|
liburi-perl,
|
||||||
libwww-perl,
|
libwww-perl,
|
||||||
|
Loading…
Reference in New Issue
Block a user