mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CA-142255:XenCenter popup exception dialog which is unexpected
Signed-off-by: Cheng Zhang <cheng.zhang@citrix.com>
This commit is contained in:
parent
7d2e113130
commit
91b56d3a9e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user