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