]>
git.proxmox.com Git - pve-access-control.git/blob - test/dump-perm.pl
4 use PVE
::AccessControl
;
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";
28 my $fh = IO
::File-
>new ($opt_file, 'r') ||
29 die "can't open file $opt_file - $!\n";
31 $cfg = PVE
::AccessControl
::parse_config
($opt_file, $fh);
35 $cfg = PVE
::AccessControl
::load_user_config
();
37 my $perm = PVE
::AccessControl
::permission
($cfg, $username, $path);
39 print "permission for user '$username' on '$path':\n";
40 print join(',', keys %$perm) . "\n";