mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Merge pull request #1040 from MihaelaStoica/CA-213414
CA-213414: Check feature-flag for ssl-legacy control switch
This commit is contained in:
commit
d18a70f6f1
@ -197,7 +197,7 @@ namespace XenAdmin.Dialogs
|
||||
ShowTab(PoolGpuEditPage = new PoolGpuEditPage());
|
||||
}
|
||||
|
||||
if (is_pool_or_standalone && Helpers.DundeeOrGreater(xenObject.Connection))
|
||||
if (is_pool_or_standalone && !Helpers.FeatureForbidden(xenObject.Connection, Host.RestrictSslLegacySwitch))
|
||||
ShowTab(SecurityEditPage = new SecurityEditPage());
|
||||
|
||||
if (is_network)
|
||||
|
@ -502,6 +502,25 @@ namespace XenAPI
|
||||
return h._RestrictVss;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For Dundee and greater hosts: the feature is restricted only if the "restrict_ssl_legacy_switch" key exists and it is true
|
||||
/// For pre-Dundee hosts: the feature is restricted if the "restrict_ssl_legacy_switch" key is absent or it is true
|
||||
/// </summary>
|
||||
private bool _RestrictSslLegacySwitch
|
||||
{
|
||||
get
|
||||
{
|
||||
return Helpers.DundeeOrGreater(this)
|
||||
? BoolKey(license_params, "restrict_ssl_legacy_switch")
|
||||
: BoolKeyPreferTrue(license_params, "restrict_ssl_legacy_switch");
|
||||
}
|
||||
}
|
||||
|
||||
public static bool RestrictSslLegacySwitch(Host h)
|
||||
{
|
||||
return h._RestrictSslLegacySwitch;
|
||||
}
|
||||
|
||||
public bool HasPBDTo(SR sr)
|
||||
{
|
||||
foreach (XenRef<PBD> pbd in PBDs)
|
||||
|
Loading…
Reference in New Issue
Block a user