[pve-devel] [PATCH v2 access-control 21/23] API: add group members to group index
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Nov 21 15:43:39 CET 2019
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
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;
}
--
2.20.1
More information about the pve-devel
mailing list