mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
commit
be0fb37df7
@ -86,6 +86,7 @@ namespace XenAdmin.ConsoleView
|
||||
private Timer connectionPoller = null;
|
||||
|
||||
private VM sourceVM = null;
|
||||
private bool sourceIsPV = false;
|
||||
|
||||
private readonly Object hostedConsolesLock = new Object();
|
||||
private List<XenRef<Console>> hostedConsoles = null;
|
||||
@ -538,7 +539,7 @@ namespace XenAdmin.ConsoleView
|
||||
if (RemoteConsole != null && RemoteConsole.ConsoleControl != null)
|
||||
{
|
||||
RemoteConsole.KeyHandler = this.KeyHandler;
|
||||
RemoteConsole.SendScanCodes = hasRDP;
|
||||
RemoteConsole.SendScanCodes = !this.sourceIsPV;
|
||||
RemoteConsole.Scaling = Scaling;
|
||||
RemoteConsole.DisplayBorder = this.displayFocusRectangle;
|
||||
SetKeyboardAndMouseCapture(autoCaptureKeyboardAndMouse);
|
||||
@ -654,6 +655,8 @@ namespace XenAdmin.ConsoleView
|
||||
if (value != null)
|
||||
{
|
||||
value.PropertyChanged += new PropertyChangedEventHandler(VM_PropertyChanged);
|
||||
|
||||
sourceIsPV = !value.IsHVM;
|
||||
|
||||
startPolling();
|
||||
|
||||
@ -1009,7 +1012,7 @@ namespace XenAdmin.ConsoleView
|
||||
}
|
||||
else
|
||||
{
|
||||
v.SendScanCodes = UseSource && hasRDP;
|
||||
v.SendScanCodes = UseSource && !this.sourceIsPV;
|
||||
v.SourceVM = sourceVM;
|
||||
v.Console = console;
|
||||
v.connect(stream, this.vncPassword);
|
||||
|
@ -765,6 +765,8 @@ namespace XenAdmin
|
||||
Alert.RemoveAlert(alert => alert.Connection != null && alert.Connection.Equals(connection));
|
||||
Updates.CheckServerPatches();
|
||||
Updates.CheckServerVersion();
|
||||
|
||||
RequestRefreshTreeView();
|
||||
}
|
||||
|
||||
void connection_CachePopulated(object sender, EventArgs e)
|
||||
|
@ -233,12 +233,12 @@ namespace XenAPI
|
||||
|
||||
if (Helpers.MidnightRideOrGreater(connection))
|
||||
{
|
||||
if (connection.Session.IsLocalSuperuser)
|
||||
if (connection.Session != null && connection.Session.IsLocalSuperuser)
|
||||
return true;
|
||||
|
||||
foreach (Role role in validRoleList)
|
||||
{
|
||||
if (connection.Session.Roles.Contains(role))
|
||||
if (connection.Session != null && connection.Session.Roles != null && connection.Session.Roles.Contains(role))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user