X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=blobdiff_plain;f=PVE%2FAPI2%2FUser.pm;h=602e3f030ba4bc990adf7717e659f1007cf1b7f5;hp=6208ad5bdfa94e65e374937d926ef1eae34ef37f;hb=5654af83fa4f8ffc4e44176eea6229716eae2036;hpb=96f8ebd62506bc7126d58400004101ef6a13ca71 diff --git a/PVE/API2/User.pm b/PVE/API2/User.pm index 6208ad5..602e3f0 100644 --- a/PVE/API2/User.pm +++ b/PVE/API2/User.pm @@ -10,8 +10,6 @@ use PVE::JSONSchema qw(get_standard_option); use PVE::SafeSyslog; -use Data::Dumper; # fixme: remove - use PVE::RESTHandler; use base qw(PVE::RESTHandler); @@ -119,7 +117,11 @@ __PACKAGE__->register_method ({ minLength => 5, maxLength => 64 }, - groups => { type => 'string', optional => 1, format => 'pve-groupid-list'}, + groups => { + type => 'string', format => 'pve-groupid-list', + optional => 1, + completion => \&PVE::AccessControl::complete_group, + }, firstname => { type => 'string', optional => 1 }, lastname => { type => 'string', optional => 1 }, email => { type => 'string', optional => 1, format => 'email-opt' }, @@ -238,8 +240,14 @@ __PACKAGE__->register_method ({ parameters => { additionalProperties => 0, properties => { - userid => get_standard_option('userid'), - groups => { type => 'string', optional => 1, format => 'pve-groupid-list' }, + userid => get_standard_option('userid', { + completion => \&PVE::AccessControl::complete_username, + }), + groups => { + type => 'string', format => 'pve-groupid-list', + optional => 1, + completion => \&PVE::AccessControl::complete_group, + }, append => { type => 'boolean', optional => 1, @@ -325,7 +333,9 @@ __PACKAGE__->register_method ({ parameters => { additionalProperties => 0, properties => { - userid => get_standard_option('userid'), + userid => get_standard_option('userid', { + completion => \&PVE::AccessControl::complete_username, + }), } }, returns => { type => 'null' },