Merge
This commit is contained in:
commit
b60e9238c0
13 changed files with 133 additions and 48 deletions
|
@ -147,4 +147,7 @@
|
|||
<data name="lblComputersRootOU.Text" xml:space="preserve">
|
||||
<value>Computers Root OU:</value>
|
||||
</data>
|
||||
<data name="cbCollectionsImport.Text" xml:space="preserve">
|
||||
<value>Allow Collections Import</value>
|
||||
</data>
|
||||
</root>
|
|
@ -57,7 +57,12 @@
|
|||
</asp:Panel>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<table>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<asp:CheckBox runat="server" Text="Allow Collections Import" ID="cbCollectionsImport" meta:resourcekey="cbCollectionsImport" Checked="false" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="SubHead" width="200" nowrap>
|
||||
<asp:Label runat="server" ID="lblConnectionBroker" meta:resourcekey="lblConnectionBroker" Text="Connection Broker:"/>
|
||||
|
|
|
@ -32,13 +32,14 @@ using System.Collections.Generic;
|
|||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.EnterpriseServer.Base.RDS;
|
||||
using WebsitePanel.Providers.Common;
|
||||
using WebsitePanel.Providers.RemoteDesktopServices;
|
||||
|
||||
namespace WebsitePanel.Portal.ProviderControls
|
||||
{
|
||||
public partial class RDS_Settings : WebsitePanelControlBase, IHostingServiceProviderSettings
|
||||
{
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
FillCertificateInfo();
|
||||
|
@ -98,6 +99,11 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
txtCentralNPS.Enabled = false;
|
||||
txtCentralNPS.Text = string.Empty;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]))
|
||||
{
|
||||
cbCollectionsImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]);
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveSettings(System.Collections.Specialized.StringDictionary settings)
|
||||
|
@ -108,6 +114,7 @@ namespace WebsitePanel.Portal.ProviderControls
|
|||
settings["PrimaryDomainController"] = txtPrimaryDomainController.Text;
|
||||
settings["UseCentralNPS"] = chkUseCentralNPS.Checked.ToString();
|
||||
settings["CentralNPS"] = chkUseCentralNPS.Checked ? txtCentralNPS.Text : string.Empty;
|
||||
settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT] = cbCollectionsImport.Checked.ToString();
|
||||
|
||||
settings["GWServrsList"] = GWServers;
|
||||
|
||||
|
|
|
@ -84,6 +84,15 @@ namespace WebsitePanel.Portal.ProviderControls {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblExpiryDate;
|
||||
|
||||
/// <summary>
|
||||
/// cbCollectionsImport control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbCollectionsImport;
|
||||
|
||||
/// <summary>
|
||||
/// lblConnectionBroker control.
|
||||
/// </summary>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
@ -55,8 +56,10 @@ namespace WebsitePanel.Portal.RDS
|
|||
btnAddCollection.Enabled = (!(cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue <= gvRDSCollections.Rows.Count) || (cntx.Quotas[Quotas.RDS_COLLECTIONS].QuotaAllocatedValue == -1));
|
||||
}
|
||||
|
||||
var defaultSettings = ES.Services.Users.GetUserSettings(PanelSecurity.EffectiveUserId, UserSettings.RDS_POLICY);
|
||||
var allowImport = Convert.ToBoolean(defaultSettings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]);
|
||||
var serviceId = ES.Services.RDS.GetRemoteDesktopServiceId(PanelRequest.ItemID);
|
||||
var settings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(serviceId));
|
||||
|
||||
var allowImport = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCOLLECTIONSIMPORT]);
|
||||
|
||||
if (!allowImport)
|
||||
{
|
||||
|
@ -64,6 +67,8 @@ namespace WebsitePanel.Portal.RDS
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void BindQuota(PackageContext cntx)
|
||||
{
|
||||
OrganizationStatistics stats = ES.Services.Organizations.GetOrganizationStatisticsByOrganization(PanelRequest.ItemID);
|
||||
|
@ -142,5 +147,16 @@ namespace WebsitePanel.Portal.RDS
|
|||
{
|
||||
return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "rds_edit_collection", "CollectionId=" + collectionId, "ItemID=" + PanelRequest.ItemID);
|
||||
}
|
||||
|
||||
private StringDictionary ConvertArrayToDictionary(string[] settings)
|
||||
{
|
||||
StringDictionary r = new StringDictionary();
|
||||
foreach (string setting in settings)
|
||||
{
|
||||
int idx = setting.IndexOf('=');
|
||||
r.Add(setting.Substring(0, idx), setting.Substring(idx + 1));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,14 +181,3 @@
|
|||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
<wsp:CollapsiblePanel id="secAllowImport" runat="server" TargetControlID="allowImportPanel" meta:resourcekey="secAllowImport" Text="Connections Import"/>
|
||||
<asp:Panel ID="allowImportPanel" runat="server" Height="0" style="overflow:hidden;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:CheckBox runat="server" Text="Users" ID="cbAllowImport" meta:resourcekey="cbAllowImport" Checked="false" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br />
|
||||
</asp:Panel>
|
||||
|
|
|
@ -52,8 +52,7 @@ namespace WebsitePanel.Portal
|
|||
cbDisableCmdAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS]);
|
||||
cbDisableCmdUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_CMD_USERS]);
|
||||
|
||||
ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE];
|
||||
cbAllowImport.Checked = Convert.ToBoolean(settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT]);
|
||||
ddTreshold.SelectedValue = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE];
|
||||
}
|
||||
|
||||
public void SaveSettings(UserSettings settings)
|
||||
|
@ -81,8 +80,7 @@ namespace WebsitePanel.Portal
|
|||
settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_ADMINISTRATORS] = cbControlSessionAdministrators.Checked.ToString();
|
||||
settings[RdsServerSettings.RDS_CONTROL_WITHOUT_PERMISSION_Users] = cbControlSessionUsers.Checked.ToString();
|
||||
settings[RdsServerSettings.DISABLE_CMD_ADMINISTRATORS] = cbDisableCmdAdministrators.Checked.ToString();
|
||||
settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString();
|
||||
settings[RdsServerSettings.ALLOWCONNECTIONSIMPORT] = cbAllowImport.Checked.ToString();
|
||||
settings[RdsServerSettings.DISABLE_CMD_USERS] = cbDisableCmdUsers.Checked.ToString();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -443,32 +443,5 @@ namespace WebsitePanel.Portal {
|
|||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbDisableCmdAdministrators;
|
||||
|
||||
/// <summary>
|
||||
/// secAllowImport control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secAllowImport;
|
||||
|
||||
/// <summary>
|
||||
/// allowImportPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel allowImportPanel;
|
||||
|
||||
/// <summary>
|
||||
/// cbAllowImport control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbAllowImport;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6538,7 +6538,9 @@
|
|||
<Content Include="RDS\UserControls\App_LocalResources\RDSCollectionApps.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx" />
|
||||
<Content Include="ProviderControls\App_LocalResources\RDS_Settings.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="UserControls\App_LocalResources\DomainControl.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue