mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CP-10334: Make Export resource data option available for pools or standalone hosts (used to be pool only)
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
ee4d9da505
commit
fcbefc6f75
@ -36,6 +36,7 @@ using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using XenAdmin.Core;
|
||||
using XenAdmin;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdmin.Commands
|
||||
{
|
||||
@ -82,8 +83,11 @@ namespace XenAdmin.Commands
|
||||
|
||||
private static bool CanExecute(SelectedItem selection)
|
||||
{
|
||||
if(selection.Connection != null && selection.Connection.IsConnected && selection.PoolAncestor != null)
|
||||
return !Helpers.FeatureForbidden(selection.Connection, XenAPI.Host.RestrictExportResourceData);
|
||||
bool isPoolOrStandalone = selection.XenObject is Pool
|
||||
|| (selection.XenObject is Host && Helpers.GetPool(selection.Connection) == null);
|
||||
|
||||
if (selection.Connection != null && selection.Connection.IsConnected && isPoolOrStandalone)
|
||||
return !Helpers.FeatureForbidden(selection.Connection, Host.RestrictExportResourceData);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user