[pve-devel] applied: [PATCH v3 access-control 17/20] API: add group members to group index

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Jan 28 20:57:18 CET 2020


On 1/21/20 1:54 PM, Fabian Grünbichler wrote:
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
> see corresponding patch in pve-manager
> 
>  PVE/API2/Group.pm | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/PVE/API2/Group.pm b/PVE/API2/Group.pm
> index 37f8be2..c463bd6 100644
> --- a/PVE/API2/Group.pm
> +++ b/PVE/API2/Group.pm
> @@ -38,6 +38,12 @@ __PACKAGE__->register_method ({
>  	    properties => {
>  		groupid => get_standard_option('group-id'),
>  		comment => get_standard_option('group-comment'),
> +		users => {
> +		    type => 'string',
> +		    format => 'pve-userid-list',
> +		    optional => 1,
> +		    description => 'list of users which form this group',
> +		},
>  	    },
>  	},
>  	links => [ { rel => 'child', href => "{groupid}" } ],
> @@ -58,6 +64,7 @@ __PACKAGE__->register_method ({
>  	    my $data = $usercfg->{groups}->{$group};
>  	    my $entry = { groupid => $group };
>  	    $entry->{comment} = $data->{comment} if defined($data->{comment});
> +	    $entry->{users} = join (',', sort keys %{$data->{users}}) if defined($data->{users});
>  	    push @$res, $entry;
>  	}
>  
> 

applied, thanks!





More information about the pve-devel mailing list