diff options
Diffstat (limited to 'server/wallet-report')
-rwxr-xr-x | server/wallet-report | 46 |
1 files changed, 42 insertions, 4 deletions
diff --git a/server/wallet-report b/server/wallet-report index a6b3b8d..435fb73 100755 --- a/server/wallet-report +++ b/server/wallet-report @@ -35,6 +35,20 @@ sub command { for my $acl (sort { $$a[1] cmp $$b[1] } @acls) { print "$$acl[1] (ACL ID: $$acl[0])\n"; } + } elsif ($command eq 'audit') { + die "too many arguments to audit\n" if @args > 2; + die "too few arguments to audit\n" if @args < 2; + my @result = $report->audit (@args); + if (!@result and $report->error) { + die $report->error, "\n"; + } + for my $item (@result) { + if ($args[0] eq 'acls') { + print "$$item[1] (ACL ID: $$item[0])\n"; + } else { + print join (' ', @$item), "\n"; + } + } } elsif ($command eq 'objects') { die "too many arguments to objects\n" if @args > 2; my @objects = $report->objects (@args); @@ -100,6 +114,8 @@ B<wallet-report> takes no traditional options. =item acls entry <scheme> <identifier> +=item acls unused + Returns a list of ACLs in the database. ACLs will be listed in the form: <name> (ACL ID: <id>) @@ -127,8 +143,30 @@ Returns all ACLs containing an entry with given scheme and identifier. The scheme must be an exact match, but the <identifier> string will match any identifier containing that string. +=item acls unused + +Returns all ACLs that are not referenced by any of the objects in the +wallet database, either as an owner or on one of the more specific ACLs. + =back +=item audit acls name + +=item audit objects name + +Returns all ACLs or objects that violate the current site naming policy. +Objects will be listed in the form: + + <type> <name> + +and ACLs in the form: + + <name> (ACL ID: <id>) + +where <name> is the human-readable name and <id> is the numeric ID. The +numeric ID is what's used internally by the wallet system. There will be +one line per object or ACL. + =item objects =item objects acl <acl> @@ -154,21 +192,21 @@ The currently supported object search types are: =over 4 -=item list objects acl <acl> +=item objects acl <acl> Returns all objects for which the given ACL name or ID has any permissions. This includes those objects owned by the ACL as well as those where that ACL has any other, more limited permissions. -=item list objects flag <flag> +=item objects flag <flag> Returns all objects which have the given flag set. -=item list objects owner <acl> +=item objects owner <acl> Returns all objects owned by the given ACL name or ID. -=item list objects type <type> +=item objects type <type> Returns all objects of the given type. |