mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-27 01:28:43 +00:00
allow to filter enabled/disabled user
This commit is contained in:
parent
be6ea72391
commit
cb6f2f93ed
2
Makefile
2
Makefile
@ -2,7 +2,7 @@ RELEASE=2.0
|
||||
|
||||
VERSION=1.0
|
||||
PACKAGE=libpve-access-control
|
||||
PKGREL=5
|
||||
PKGREL=6
|
||||
|
||||
DESTDIR=
|
||||
PREFIX=/usr
|
||||
|
@ -38,7 +38,13 @@ __PACKAGE__->register_method ({
|
||||
description => "User index.",
|
||||
parameters => {
|
||||
additionalProperties => 0,
|
||||
properties => {},
|
||||
properties => {
|
||||
enabled => {
|
||||
type => 'boolean',
|
||||
description => "Optional filter for enable property.",
|
||||
optional => 1,
|
||||
}
|
||||
},
|
||||
},
|
||||
returns => {
|
||||
type => 'array',
|
||||
@ -59,8 +65,14 @@ __PACKAGE__->register_method ({
|
||||
|
||||
foreach my $user (keys %{$usercfg->{users}}) {
|
||||
next if $user eq 'root';
|
||||
|
||||
|
||||
my $entry = &$extract_user_data($usercfg->{users}->{$user});
|
||||
|
||||
if (defined($param->{enabled})) {
|
||||
next if $entry->{enable} && !$param->{enabled};
|
||||
next if !$entry->{enable} && $param->{enabled};
|
||||
}
|
||||
|
||||
$entry->{userid} = $user;
|
||||
push @$res, $entry;
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
libpve-access-control (1.0-6) unstable; urgency=low
|
||||
|
||||
* API change: allow to filter enabled/disabled users.
|
||||
|
||||
-- Proxmox Support Team <support@proxmox.com> Wed, 11 Jan 2012 12:30:37 +0100
|
||||
|
||||
libpve-access-control (1.0-5) unstable; urgency=low
|
||||
|
||||
* add a way to return file changes (diffs): set_result_changes()
|
||||
|
Loading…
Reference in New Issue
Block a user