mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CA-148233: Uncaught exception in XenCenter on "Disconnect All"
This commit is contained in:
parent
9f77454246
commit
adae99a99e
@ -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