]>
git.proxmox.com Git - pve-access-control.git/blob - test/dump-perm.pl
4 use PVE
::RPCEnvironment
;
9 # dump-perm.pl -f myuser.cfg root /
12 if (!GetOptions
("file=s" => \
$opt_file)) {
19 if (!($username && $path)) {
20 print "usage: $0 <username> <path>\n";
26 my $rpcenv = PVE
::RPCEnvironment-
>init('cli');
28 $rpcenv->init_request(userconfig
=> $opt_file);
30 $rpcenv->init_request();
33 my $perm = $rpcenv->permissions($username, $path);
35 print "permission for user '$username' on '$path':\n";
36 print join(',', keys %$perm) . "\n";