diff options
author | Jon Robertson <jonrober@stanford.edu> | 2009-12-03 08:52:19 -0800 |
---|---|---|
committer | Jon Robertson <jonrober@stanford.edu> | 2009-12-03 08:52:19 -0800 |
commit | 2c5bd71125d411639b4a61116957879eebae21ad (patch) | |
tree | 94ab9de66c95431b43309fc02ed0318b0a00c0d7 /server | |
parent | b87c38cb69f9b43894c377cd9370ec3e8c42d4cc (diff) |
Improved wallet-admin list command with searches
wallet-admin's list command now has additional searches added for objects
and acls that match certain specifiers. For objects these include
searching for objects owned by a specific ACL, objects owned by no one,
objects of a specific type, objects with a specific flag, and objects for
which a specific ACL has any privileges at all. For acls, this includes
the ability to search for any ACL with an entry with given type and
identifier.
Diffstat (limited to 'server')
-rwxr-xr-x | server/wallet-admin | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/wallet-admin b/server/wallet-admin index b5674c5..01fea5c 100755 --- a/server/wallet-admin +++ b/server/wallet-admin @@ -42,11 +42,11 @@ sub command { unless $args[0] =~ /^[^\@\s]+\@\S+$/; $admin->initialize (@args) or die $admin->error, "\n"; } elsif ($command eq 'list') { - die "too many arguments to list\n" if @args > 1; + die "too many arguments to list\n" if @args > 4; die "too few arguments to list\n" if @args < 1; - my ($type) = @args; + my ($type, $subtype, @search) = @args; if ($type eq 'objects') { - my @objects = $admin->list_objects; + my @objects = $admin->list_objects ($subtype, @search); if (!@objects and $admin->error) { die $admin->error, "\n"; } @@ -54,7 +54,7 @@ sub command { print join (' ', @$object), "\n"; } } elsif ($type eq 'acls') { - my @acls = $admin->list_acls; + my @acls = $admin->list_acls ($subtype, @search); if (!@acls and $admin->error) { die $admin->error, "\n"; } |