mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Merge pull request #241 from GaborApatiNagy/CA-148233
CA-148233: Uncaught exception in XenCenter on "Disconnect All"
This commit is contained in:
commit
11ca05e211
@ -233,12 +233,12 @@ namespace XenAPI
|
|||||||
|
|
||||||
if (Helpers.MidnightRideOrGreater(connection))
|
if (Helpers.MidnightRideOrGreater(connection))
|
||||||
{
|
{
|
||||||
if (connection.Session.IsLocalSuperuser)
|
if (connection.Session != null && connection.Session.IsLocalSuperuser)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
foreach (Role role in validRoleList)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user