mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-01-05 21:48:49 +01:00
vncserver: print user permissions
This commit is contained in:
parent
db2901e673
commit
fa4308c542
@ -906,12 +906,17 @@ sub AtLeastOneUserConfigured {
|
||||
|
||||
sub LoadKasmPasswdUsers {
|
||||
my @result = ();
|
||||
my %permissionExplanations = ("w" => "can use keyboard and mouse",
|
||||
"o" => "can add/remove users",
|
||||
"ow" => "can use keyboard and mouse, add/remove users",
|
||||
"" => "can only view");
|
||||
|
||||
open(FH, '<', $kasmPasswdFile) or return @result;
|
||||
|
||||
while(<FH>){
|
||||
$_ =~ /^([^:]+):/ or die "$kasmPasswdFile is incorrect";
|
||||
push(@result, $1);
|
||||
chomp $_;
|
||||
my ($name, $__, $permissions) = split(':', $_);
|
||||
push(@result, "$name ($permissionExplanations{$permissions})");
|
||||
}
|
||||
|
||||
close(FH);
|
||||
@ -919,7 +924,6 @@ sub LoadKasmPasswdUsers {
|
||||
return @result;
|
||||
}
|
||||
|
||||
|
||||
sub MakeXCookie {
|
||||
# Make an X server cookie and set up the Xauthority file
|
||||
# mcookie is a part of util-linux, usually only GNU/Linux systems have it.
|
||||
|
Loading…
Reference in New Issue
Block a user