[pve-devel] [PATCH access-control 1/3] Add parameter userlist to pveum for listing users

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Sep 25 13:31:11 CEST 2017


In addition to Thomas' reply:

On Fri, Sep 22, 2017 at 04:32:29PM +0200, Alwin Antreich wrote:
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>  PVE/CLI/pveum.pm | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/PVE/CLI/pveum.pm b/PVE/CLI/pveum.pm
> index aef7089..0426cfb 100755
> --- a/PVE/CLI/pveum.pm
> +++ b/PVE/CLI/pveum.pm
> @@ -18,6 +18,7 @@ use PVE::API2::ACL;
>  use PVE::API2::AccessControl;
>  use PVE::JSONSchema qw(get_standard_option);
>  use PVE::CLIHandler;
> +use POSIX qw(strftime);
>  
>  use base qw(PVE::CLIHandler);
>  
> @@ -49,6 +50,26 @@ our $cmddef = {
>      useradd => [ 'PVE::API2::User', 'create_user', ['userid'] ],
>      usermod => [ 'PVE::API2::User', 'update_user', ['userid'] ],
>      userdel => [ 'PVE::API2::User', 'delete_user', ['userid'] ],
> +    userlist => [ 'PVE::API2::User', 'index', undef, undef, sub {

Please put longer subs in variables above the $cmddef rather than
inlining them. (Goes for all patches.)

> +	    my $userlist = shift;

Please use: my ($userlist) = @_;




More information about the pve-devel mailing list