mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-08-08 14:23:22 +00:00
remove old test.pl code (does not work anyways).
This commit is contained in:
parent
a1f8aaae84
commit
81bc8fa7e0
22
test.pl
22
test.pl
@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/perl -w
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use PVE::AccessControl;
|
|
||||||
|
|
||||||
# create ticket using username and password
|
|
||||||
#my $ticket = PVE::AccessControl::create_ticket(undef, $username, $password);
|
|
||||||
|
|
||||||
# create ticket using ident auth
|
|
||||||
my $login = getpwuid($<);
|
|
||||||
my $username = ($< == 0) ? 'root' : "$login\@localhost";
|
|
||||||
my $ticket = PVE::AccessControl::create_ticket(undef, $username);
|
|
||||||
print "got ticket using ident auth: $ticket\n";
|
|
||||||
|
|
||||||
for (my $i = 0; $i < 1; $i++) {
|
|
||||||
$ticket = PVE::AccessControl::create_ticket($ticket, $username);
|
|
||||||
print "renewed ticket: $ticket\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $user = 'testuser';
|
|
||||||
|
|
||||||
PVE::AccessControl::add_user($ticket, $user, 'testpw');
|
|
Loading…
Reference in New Issue
Block a user