CA-142255:XenCenter popup exception dialog which is unexpected

Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
Cheng Zhang 2014-08-29 16:50:47 +08:00
parent 7d2e113130
commit 91b56d3a9e

View File

@ -223,13 +223,16 @@ namespace XenAPI
/// <param name="validRoleList">The list of roles which can perform all the methods</param>
public static bool CanPerform(RbacMethodList apiMethodsToRoleCheck, IXenConnection connection, out List<Role> validRoleList, bool debug)
{
if (!connection.IsConnected)
{
validRoleList = new List<Role>();
return false;
}
else
validRoleList = ValidRoleList(apiMethodsToRoleCheck, connection, debug);
if (Helpers.MidnightRideOrGreater(connection))
{
if (!connection.IsConnected)
return false;
if (connection.Session.IsLocalSuperuser)
return true;