diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index d5bccec6..49945dca 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -9334,3 +9334,118 @@ exec sp_executesql @sql, N'@ItemID int, @IncludeMailboxes bit', RETURN GO + + +-- RDS GPO + +IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE name = 'RDSServerSettings') +CREATE TABLE [dbo].[RDSServerSettings]( + [RdsServerId] [int] NOT NULL, + [SettingsName] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL, + [PropertyName] [nvarchar](50) COLLATE Latin1_General_CI_AS NOT NULL, + [PropertyValue] [ntext] COLLATE Latin1_General_CI_AS NULL, + [ApplyUsers] [BIT] NOT NULL, + [ApplyAdministrators] [BIT] NOT NULL + CONSTRAINT [PK_RDSServerSettings] PRIMARY KEY CLUSTERED +( + [RdsServerId] ASC, + [SettingsName] ASC, + [PropertyName] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) +) + +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetRDSServerSettings') +DROP PROCEDURE GetRDSServerSettings +GO +CREATE PROCEDURE GetRDSServerSettings +( + @ServerId int, + @SettingsName nvarchar(50) +) +AS + SELECT RDSServerId, PropertyName, PropertyValue, ApplyUsers, ApplyAdministrators + FROM RDSServerSettings + WHERE RDSServerId = @ServerId AND SettingsName = @SettingsName +GO + + +IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'UpdateRDSServerSettings') +DROP PROCEDURE UpdateRDSServerSettings +GO +CREATE PROCEDURE UpdateRDSServerSettings +( + @ServerId int, + @SettingsName nvarchar(50), + @Xml ntext +) +AS + +BEGIN TRAN +DECLARE @idoc int +EXEC sp_xml_preparedocument @idoc OUTPUT, @xml + +DELETE FROM RDSServerSettings +WHERE RDSServerId = @ServerId AND SettingsName = @SettingsName + +INSERT INTO RDSServerSettings +( + RDSServerId, + SettingsName, + ApplyUsers, + ApplyAdministrators, + PropertyName, + PropertyValue +) +SELECT + @ServerId, + @SettingsName, + ApplyUsers, + ApplyAdministrators, + PropertyName, + PropertyValue +FROM OPENXML(@idoc, '/properties/property',1) WITH +( + PropertyName nvarchar(50) '@name', + PropertyValue ntext '@value', + ApplyUsers BIT '@applyUsers', + ApplyAdministrators BIT '@applyAdministrators' +) as PV + +exec sp_xml_removedocument @idoc + +COMMIT TRAN + +RETURN + +GO + + +IF EXISTS (SELECT * FROM ResourceGroups WHERE GroupName = 'SharePoint') +BEGIN + DECLARE @group_id INT + SELECT @group_id = GroupId FROM ResourceGroups WHERE GroupName = 'SharePoint' + DELETE FROM Providers WHERE GroupID = @group_id + DELETE FROM Quotas WHERE GroupID = @group_id + DELETE FROM VirtualGroups WHERE GroupID = @group_id + DELETE FROM ServiceItemTypes WHERE GroupID = @group_id + DELETE FROM ResourceGroups WHERE GroupID = @group_id +END + +GO + +IF NOT EXISTS (SELECT * FROM [dbo].[ServiceItemTypes] WHERE DisplayName = 'SharePointFoundationSiteCollection') +BEGIN + DECLARE @group_id AS INT + DECLARE @item_type_id INT + SELECT TOP 1 @item_type_id = ItemTypeId + 1 FROM [dbo].[ServiceItemTypes] ORDER BY ItemTypeId DESC + UPDATE [dbo].[ServiceItemTypes] SET DisplayName = 'SharePointFoundationSiteCollection' WHERE DisplayName = 'SharePointSiteCollection' + SELECT @group_id = GroupId FROM [dbo].[ResourceGroups] WHERE GroupName = 'Sharepoint Server' + + INSERT INTO [dbo].[ServiceItemTypes] (ItemTypeId, GroupId, DisplayName, TypeName, TypeOrder, CalculateDiskSpace, CalculateBandwidth, Suspendable, Disposable, Searchable, Importable, Backupable) + (SELECT TOP 1 @item_type_id, @group_id, 'SharePointSiteCollection', TypeName, 100, CalculateDiskSpace, CalculateBandwidth, Suspendable, Disposable, Searchable, Importable, Backupable FROM [dbo].[ServiceItemTypes] WHERE DisplayName = 'SharePointFoundationSiteCollection') +END + +GO \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSetting.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSetting.cs new file mode 100644 index 00000000..d51b9155 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSetting.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace WebsitePanel.EnterpriseServer.Base.RDS +{ + public class RdsServerSetting + { + public string PropertyName { get; set; } + public string PropertyValue { get; set; } + public bool ApplyUsers { get; set; } + public bool ApplyAdministrators { get; set; } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSettings.cs new file mode 100644 index 00000000..983ac341 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/RDS/RdsServerSettings.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; +using System.Text; +using System.Xml.Serialization; + +namespace WebsitePanel.EnterpriseServer.Base.RDS +{ + public class RdsServerSettings + { + private List settings = null; + + public const string LOCK_SCREEN_TIMEOUT_VALUE = "LockScreenTimeoutValue"; + public const string LOCK_SCREEN_TIMEOUT_ADMINISTRATORS = "LockScreenTimeoutAdministrators"; + public const string LOCK_SCREEN_TIMEOUT_USERS = "LockScreenTimeoutUsers"; + public const string REMOVE_RUN_COMMAND_ADMINISTRATORS = "RemoveRunCommandAdministrators"; + public const string REMOVE_RUN_COMMAND_USERS = "RemoveRunCommandUsers"; + public const string REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS = "RemovePowershellCommandAdministrators"; + public const string REMOVE_POWERSHELL_COMMAND_USERS = "RemovePowershellCommandUsers"; + public const string HIDE_C_DRIVE_ADMINISTRATORS = "HideCDriveAdministrators"; + public const string HIDE_C_DRIVE_USERS = "HideCDriveUsers"; + public const string REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS = "RemoveShutdownRestartAdministrators"; + public const string REMOVE_SHUTDOWN_RESTART_USERS = "RemoveShutdownRestartUsers"; + public const string DISABLE_TASK_MANAGER_ADMINISTRATORS = "DisableTaskManagerAdministrators"; + public const string DISABLE_TASK_MANAGER_USERS = "DisableTaskManagerUsers"; + public const string CHANGE_DESKTOP_DISABLED_ADMINISTRATORS = "ChangingDesktopDisabledAdministrators"; + public const string CHANGE_DESKTOP_DISABLED_USERS = "ChangingDesktopDisabledUsers"; + public const string SCREEN_SAVER_DISABLED_ADMINISTRATORS = "ScreenSaverDisabledAdministrators"; + public const string SCREEN_SAVER_DISABLED_USERS = "ScreenSaverDisabledUsers"; + public const string DRIVE_SPACE_THRESHOLD_VALUE = "DriveSpaceThresholdValue"; + + public string SettingsName { get; set; } + public int ServerId { get; set; } + + public List Settings + { + get + { + if (settings == null) + { + settings = new List(); + } + return settings; + } + set + { + settings = value; + } + } + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs index bd033937..251d5dbf 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs @@ -64,6 +64,7 @@ namespace WebsitePanel.EnterpriseServer public const string DEFAULT_MAILBOXPLANS = "DefaultMailboxPlans"; public const string DEFAULT_LYNCUSERPLANS = "DefaultLyncUserPlans"; public const string RDS_SETUP_LETTER = "RDSSetupLetter"; + public const string RDS_POLICY = "RdsPolicy"; public int UserId; public string SettingsName; diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj index 63f2d7cd..23f8766e 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/WebsitePanel.EnterpriseServer.Base.csproj @@ -134,6 +134,8 @@ + + Component diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs index 79deabc2..0a2fb384 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/HostedSharePointServersProxy.cs @@ -1,35 +1,7 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.1433 +// Runtime Version:2.0.50727.7905 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -37,22 +9,21 @@ //------------------------------------------------------------------------------ // -// This source code was auto-generated by wsdl, Version=2.0.50727.42. +// This source code was auto-generated by wsdl, Version=2.0.50727.3038. // -using WebsitePanel.Providers; -using WebsitePanel.Providers.SharePoint; - namespace WebsitePanel.EnterpriseServer { - using System.Diagnostics; + using System.Xml.Serialization; using System.Web.Services; using System.ComponentModel; using System.Web.Services.Protocols; using System; - using System.Xml.Serialization; + using System.Diagnostics; + using WebsitePanel.Providers.SharePoint; + using WebsitePanel.Providers; /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="esHostedSharePointServersSoap", Namespace="http://smbsaas/websitepanel/enterpriseserver")] @@ -91,7 +62,7 @@ namespace WebsitePanel.EnterpriseServer { /// public esHostedSharePointServers() { - this.Url = "http://localhost/WebsitePanelEnterpriseServer/esHostedSharePointServers.asmx"; + this.Url = "http://localhost:9002/esHostedSharePointServers.asmx"; } /// @@ -141,7 +112,7 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollectionsPaged", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { + public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) { object[] results = this.Invoke("GetSiteCollectionsPaged", new object[] { packageId, organizationId, @@ -149,12 +120,13 @@ namespace WebsitePanel.EnterpriseServer { filterValue, sortColumn, startRow, - maximumRows}); + maximumRows, + groupName}); return ((SharePointSiteCollectionListPaged)(results[0])); } /// - public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetSiteCollectionsPaged", new object[] { packageId, organizationId, @@ -162,7 +134,8 @@ namespace WebsitePanel.EnterpriseServer { filterValue, sortColumn, startRow, - maximumRows}, callback, asyncState); + maximumRows, + groupName}, callback, asyncState); } /// @@ -172,12 +145,12 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) { - this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, null); + public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) { + this.GetSiteCollectionsPagedAsync(packageId, organizationId, filterColumn, filterValue, sortColumn, startRow, maximumRows, groupName, null); } /// - public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, object userState) { + public void GetSiteCollectionsPagedAsync(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName, object userState) { if ((this.GetSiteCollectionsPagedOperationCompleted == null)) { this.GetSiteCollectionsPagedOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsPagedOperationCompleted); } @@ -188,7 +161,8 @@ namespace WebsitePanel.EnterpriseServer { filterValue, sortColumn, startRow, - maximumRows}, this.GetSiteCollectionsPagedOperationCompleted, userState); + maximumRows, + groupName}, this.GetSiteCollectionsPagedOperationCompleted, userState); } private void OnGetSiteCollectionsPagedOperationCompleted(object arg) { @@ -241,18 +215,20 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetSiteCollections", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive) { + public SharePointSiteCollection[] GetSiteCollections(int packageId, bool recursive, string groupName) { object[] results = this.Invoke("GetSiteCollections", new object[] { packageId, - recursive}); + recursive, + groupName}); return ((SharePointSiteCollection[])(results[0])); } /// - public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginGetSiteCollections(int packageId, bool recursive, string groupName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GetSiteCollections", new object[] { packageId, - recursive}, callback, asyncState); + recursive, + groupName}, callback, asyncState); } /// @@ -262,18 +238,19 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void GetSiteCollectionsAsync(int packageId, bool recursive) { - this.GetSiteCollectionsAsync(packageId, recursive, null); + public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName) { + this.GetSiteCollectionsAsync(packageId, recursive, groupName, null); } /// - public void GetSiteCollectionsAsync(int packageId, bool recursive, object userState) { + public void GetSiteCollectionsAsync(int packageId, bool recursive, string groupName, object userState) { if ((this.GetSiteCollectionsOperationCompleted == null)) { this.GetSiteCollectionsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSiteCollectionsOperationCompleted); } this.InvokeAsync("GetSiteCollections", new object[] { packageId, - recursive}, this.GetSiteCollectionsOperationCompleted, userState); + recursive, + groupName}, this.GetSiteCollectionsOperationCompleted, userState); } private void OnGetSiteCollectionsOperationCompleted(object arg) { @@ -420,16 +397,18 @@ namespace WebsitePanel.EnterpriseServer { /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddSiteCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public int AddSiteCollection(SharePointSiteCollection item) { + public int AddSiteCollection(SharePointSiteCollection item, string groupName) { object[] results = this.Invoke("AddSiteCollection", new object[] { - item}); + item, + groupName}); return ((int)(results[0])); } /// - public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, System.AsyncCallback callback, object asyncState) { + public System.IAsyncResult BeginAddSiteCollection(SharePointSiteCollection item, string groupName, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("AddSiteCollection", new object[] { - item}, callback, asyncState); + item, + groupName}, callback, asyncState); } /// @@ -439,17 +418,18 @@ namespace WebsitePanel.EnterpriseServer { } /// - public void AddSiteCollectionAsync(SharePointSiteCollection item) { - this.AddSiteCollectionAsync(item, null); + public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName) { + this.AddSiteCollectionAsync(item, groupName, null); } /// - public void AddSiteCollectionAsync(SharePointSiteCollection item, object userState) { + public void AddSiteCollectionAsync(SharePointSiteCollection item, string groupName, object userState) { if ((this.AddSiteCollectionOperationCompleted == null)) { this.AddSiteCollectionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSiteCollectionOperationCompleted); } this.InvokeAsync("AddSiteCollection", new object[] { - item}, this.AddSiteCollectionOperationCompleted, userState); + item, + groupName}, this.AddSiteCollectionOperationCompleted, userState); } private void OnAddSiteCollectionOperationCompleted(object arg) { @@ -839,16 +819,12 @@ namespace WebsitePanel.EnterpriseServer { } } - - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSiteCollectionsPagedCompletedEventHandler(object sender, GetSiteCollectionsPagedCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteCollectionsPagedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -870,11 +846,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSupportedLanguagesCompletedEventHandler(object sender, GetSupportedLanguagesCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSupportedLanguagesCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -896,11 +872,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSiteCollectionsCompletedEventHandler(object sender, GetSiteCollectionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -922,11 +898,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void SetStorageSettingsCompletedEventHandler(object sender, SetStorageSettingsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class SetStorageSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -948,11 +924,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSiteCollectionCompletedEventHandler(object sender, GetSiteCollectionCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -974,11 +950,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetSiteCollectionByDomainCompletedEventHandler(object sender, GetSiteCollectionByDomainCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetSiteCollectionByDomainCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1000,11 +976,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AddSiteCollectionCompletedEventHandler(object sender, AddSiteCollectionCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AddSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1026,11 +1002,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteSiteCollectionCompletedEventHandler(object sender, DeleteSiteCollectionCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1052,11 +1028,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void DeleteSiteCollectionsCompletedEventHandler(object sender, DeleteSiteCollectionsCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class DeleteSiteCollectionsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1078,11 +1054,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void BackupSiteCollectionCompletedEventHandler(object sender, BackupSiteCollectionCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class BackupSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1104,11 +1080,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void RestoreSiteCollectionCompletedEventHandler(object sender, RestoreSiteCollectionCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class RestoreSiteCollectionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1130,11 +1106,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void GetBackupBinaryChunkCompletedEventHandler(object sender, GetBackupBinaryChunkCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class GetBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1156,11 +1132,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void AppendBackupBinaryChunkCompletedEventHandler(object sender, AppendBackupBinaryChunkCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class AppendBackupBinaryChunkCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1182,11 +1158,11 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void CalculateSharePointSitesDiskSpaceCompletedEventHandler(object sender, CalculateSharePointSitesDiskSpaceCompletedEventArgs e); /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] public partial class CalculateSharePointSitesDiskSpaceCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { @@ -1216,6 +1192,6 @@ namespace WebsitePanel.EnterpriseServer { } /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] public delegate void UpdateQuotaCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e); } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs index 8a8ac9e4..4d1737fe 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/RemoteDesktopServicesProxy.cs @@ -20,6 +20,7 @@ namespace WebsitePanel.EnterpriseServer { using System.Diagnostics; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.RemoteDesktopServices; + using WebsitePanel.EnterpriseServer.Base.RDS; using WebsitePanel.Providers.Common; @@ -132,6 +133,10 @@ namespace WebsitePanel.EnterpriseServer { private System.Threading.SendOrPostCallback SendRdsSetupLetterOperationCompleted; + private System.Threading.SendOrPostCallback GetRdsServerSettingsOperationCompleted; + + private System.Threading.SendOrPostCallback UpdateRdsServerSettingsOperationCompleted; + /// public esRemoteDesktopServices() { this.Url = "http://localhost:9002/esRemoteDesktopServices.asmx"; @@ -290,6 +295,12 @@ namespace WebsitePanel.EnterpriseServer { /// public event SendRdsSetupLetterCompletedEventHandler SendRdsSetupLetterCompleted; + /// + public event GetRdsServerSettingsCompletedEventHandler GetRdsServerSettingsCompleted; + + /// + public event UpdateRdsServerSettingsCompletedEventHandler UpdateRdsServerSettingsCompleted; + /// [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsCollection", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] public RdsCollection GetRdsCollection(int collectionId) { @@ -2569,6 +2580,97 @@ namespace WebsitePanel.EnterpriseServer { } } + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/GetRdsServerSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public RdsServerSettings GetRdsServerSettings(int serverId, string settingsName) { + object[] results = this.Invoke("GetRdsServerSettings", new object[] { + serverId, + settingsName}); + return ((RdsServerSettings)(results[0])); + } + + /// + public System.IAsyncResult BeginGetRdsServerSettings(int serverId, string settingsName, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("GetRdsServerSettings", new object[] { + serverId, + settingsName}, callback, asyncState); + } + + /// + public RdsServerSettings EndGetRdsServerSettings(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((RdsServerSettings)(results[0])); + } + + /// + public void GetRdsServerSettingsAsync(int serverId, string settingsName) { + this.GetRdsServerSettingsAsync(serverId, settingsName, null); + } + + /// + public void GetRdsServerSettingsAsync(int serverId, string settingsName, object userState) { + if ((this.GetRdsServerSettingsOperationCompleted == null)) { + this.GetRdsServerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetRdsServerSettingsOperationCompleted); + } + this.InvokeAsync("GetRdsServerSettings", new object[] { + serverId, + settingsName}, this.GetRdsServerSettingsOperationCompleted, userState); + } + + private void OnGetRdsServerSettingsOperationCompleted(object arg) { + if ((this.GetRdsServerSettingsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.GetRdsServerSettingsCompleted(this, new GetRdsServerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/UpdateRdsServerSettings", RequestNamespace="http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace="http://smbsaas/websitepanel/enterpriseserver", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings) { + object[] results = this.Invoke("UpdateRdsServerSettings", new object[] { + serverId, + settingsName, + settings}); + return ((int)(results[0])); + } + + /// + public System.IAsyncResult BeginUpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings, System.AsyncCallback callback, object asyncState) { + return this.BeginInvoke("UpdateRdsServerSettings", new object[] { + serverId, + settingsName, + settings}, callback, asyncState); + } + + /// + public int EndUpdateRdsServerSettings(System.IAsyncResult asyncResult) { + object[] results = this.EndInvoke(asyncResult); + return ((int)(results[0])); + } + + /// + public void UpdateRdsServerSettingsAsync(int serverId, string settingsName, RdsServerSettings settings) { + this.UpdateRdsServerSettingsAsync(serverId, settingsName, settings, null); + } + + /// + public void UpdateRdsServerSettingsAsync(int serverId, string settingsName, RdsServerSettings settings, object userState) { + if ((this.UpdateRdsServerSettingsOperationCompleted == null)) { + this.UpdateRdsServerSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateRdsServerSettingsOperationCompleted); + } + this.InvokeAsync("UpdateRdsServerSettings", new object[] { + serverId, + settingsName, + settings}, this.UpdateRdsServerSettingsOperationCompleted, userState); + } + + private void OnUpdateRdsServerSettingsOperationCompleted(object arg) { + if ((this.UpdateRdsServerSettingsCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.UpdateRdsServerSettingsCompleted(this, new UpdateRdsServerSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + /// public new void CancelAsync(object userState) { base.CancelAsync(userState); @@ -3900,4 +4002,56 @@ namespace WebsitePanel.EnterpriseServer { } } } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void GetRdsServerSettingsCompletedEventHandler(object sender, GetRdsServerSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class GetRdsServerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal GetRdsServerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public RdsServerSettings Result { + get { + this.RaiseExceptionIfNecessary(); + return ((RdsServerSettings)(this.results[0])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + public delegate void UpdateRdsServerSettingsCompletedEventHandler(object sender, UpdateRdsServerSettingsCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class UpdateRdsServerSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal UpdateRdsServerSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public int Result { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[0])); + } + } + } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs index d83c4684..6e183d4d 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs @@ -4676,6 +4676,23 @@ namespace WebsitePanel.EnterpriseServer #region RDS + public static IDataReader GetRdsServerSettings(int serverId, string settingsName) + { + return SqlHelper.ExecuteReader(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "GetRDSServerSettings", + new SqlParameter("@ServerId", serverId), + new SqlParameter("@SettingsName", settingsName)); + } + + public static void UpdateRdsServerSettings(int serverId, string settingsName, string xml) + { + SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure, + ObjectQualifier + "UpdateRDSServerSettings", + new SqlParameter("@ServerId", serverId), + new SqlParameter("@SettingsName", settingsName), + new SqlParameter("@Xml", xml)); + } + public static int AddRdsCertificate(int serviceId, string content, byte[] hash, string fileName, DateTime? validFrom, DateTime? expiryDate) { SqlParameter rdsCertificateId = new SqlParameter("@RDSCertificateID", SqlDbType.Int); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs index 3f1f8a2d..080d0c96 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/RemoteDesktopServices/RemoteDesktopServicesController.cs @@ -45,6 +45,7 @@ using WebsitePanel.Providers.RemoteDesktopServices; using WebsitePanel.Providers.Web; using System.Net.Mail; using System.Collections; +using WebsitePanel.EnterpriseServer.Base.RDS; namespace WebsitePanel.EnterpriseServer { @@ -320,6 +321,77 @@ namespace WebsitePanel.EnterpriseServer return SendRdsSetupLetterInternal(itemId, accountId, to, cc); } + public static RdsServerSettings GetRdsServerSettings(int serverId, string settingsName) + { + return GetRdsServerSettingsInternal(serverId, settingsName); + } + + public static int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings) + { + return UpdateRdsServerSettingsInternal(serverId, settingsName, settings); + } + + private static RdsServerSettings GetRdsServerSettingsInternal(int serverId, string settingsName) + { + IDataReader reader = DataProvider.GetRdsServerSettings(serverId, settingsName); + + var settings = new RdsServerSettings(); + settings.ServerId = serverId; + settings.SettingsName = settingsName; + + while (reader.Read()) + { + settings.Settings.Add(new RdsServerSetting + { + PropertyName = (string)reader["PropertyName"], + PropertyValue = (string)reader["PropertyValue"], + ApplyAdministrators = Convert.ToBoolean("ApplyAdministrators"), + ApplyUsers = Convert.ToBoolean("ApplyUsers") + }); + } + + reader.Close(); + + return settings; + } + + private static int UpdateRdsServerSettingsInternal(int serverId, string settingsName, RdsServerSettings settings) + { + TaskManager.StartTask("REMOTE_DESKTOP_SERVICES", "UPDATE_SETTINGS"); + + try + { + XmlDocument doc = new XmlDocument(); + XmlElement nodeProps = doc.CreateElement("properties"); + + if (settings != null) + { + foreach (var setting in settings.Settings) + { + XmlElement nodeProp = doc.CreateElement("property"); + nodeProp.SetAttribute("name", setting.PropertyName); + nodeProp.SetAttribute("value", setting.PropertyValue); + nodeProp.SetAttribute("applyUsers", setting.ApplyUsers ? "1" : "0"); + nodeProp.SetAttribute("applyAdministrators", setting.ApplyAdministrators ? "1" : "0"); + nodeProps.AppendChild(nodeProp); + } + } + + string xml = nodeProps.OuterXml; + DataProvider.UpdateRdsServerSettings(serverId, settingsName, xml); + + return 0; + } + catch (Exception ex) + { + throw TaskManager.WriteError(ex); + } + finally + { + TaskManager.CompleteTask(); + } + } + private static string GetRdsSetupLetterInternal(int itemId, int? accountId) { Organization org = OrganizationController.GetOrganization(itemId); diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs index 95812922..3915a855 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SharePoint/HostedSharePointServerController.cs @@ -58,18 +58,18 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint /// Row index to start from. /// Maximum number of rows to retrieve. /// Site collections that match. - public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + public static SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName = null) { if (IsDemoMode) { SharePointSiteCollectionListPaged demoResult = new SharePointSiteCollectionListPaged(); - demoResult.SiteCollections = GetSiteCollections(1, false); + demoResult.SiteCollections = GetSiteCollections(1, false, null); demoResult.TotalRowCount = demoResult.SiteCollections.Count; return demoResult; } SharePointSiteCollectionListPaged paged = new SharePointSiteCollectionListPaged(); - DataSet result = PackageController.GetRawPackageItemsPaged(packageId, typeof(SharePointSiteCollection), + DataSet result = PackageController.GetRawPackageItemsPaged(packageId, groupName, typeof(SharePointSiteCollection), true, filterColumn, filterValue, sortColumn, startRow, Int32.MaxValue); List items = PackageController.CreateServiceItemsList(result, 1).ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); @@ -149,8 +149,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint /// /// Package that owns site collections. /// A value which shows whether nested spaces must be searched as well. + /// Resource group name. /// List of found site collections. - public static List GetSiteCollections(int packageId, bool recursive) + public static List GetSiteCollections(int packageId, bool recursive, string groupName) { if (IsDemoMode) { @@ -183,7 +184,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } - List items = PackageController.GetPackageItemsByType(packageId, typeof(SharePointSiteCollection), recursive); + List items = PackageController.GetPackageItemsByType(packageId, groupName, typeof(SharePointSiteCollection), recursive); return items.ConvertAll(delegate(ServiceProviderItem item) { return (SharePointSiteCollection)item; }); } @@ -196,7 +197,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint { if (IsDemoMode) { - return GetSiteCollections(1, false)[itemId - 1]; + return GetSiteCollections(1, false, null)[itemId - 1]; } SharePointSiteCollection item = PackageController.GetPackageItem(itemId) as SharePointSiteCollection; @@ -207,8 +208,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint /// Adds SharePoint site collection. /// /// Site collection description. + /// Resource group name. /// Created site collection id within metabase. - public static int AddSiteCollection(SharePointSiteCollection item) + public static int AddSiteCollection(SharePointSiteCollection item, string groupName) { // Check account. @@ -236,7 +238,8 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint } // Check if stats resource is available - int serviceId = PackageController.GetPackageServiceId(item.PackageId, ResourceGroups.SharepointFoundationServer); + int serviceId = PackageController.GetPackageServiceId(item.PackageId, groupName); + if (serviceId == 0) { return BusinessErrorCodes.ERROR_SHAREPOINT_RESOURCE_UNAVAILABLE; @@ -271,9 +274,9 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint int counter = 0; item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); - siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot); + siteName = String.Format("{0}", hostNameBase + "-" + counter.ToString() + "." + sslRoot); - while (DataProvider.CheckServiceItemExists(serviceId, item.Name, "WebsitePanel.Providers.SharePoint.SharePointSiteCollection, WebsitePanel.Providers.Base")) + while (CheckServiceItemExists(item.Name, item.PackageId)) { counter++; item.Name = String.Format("{0}://{1}", rootWebApplicationUri.Scheme, hostNameBase + "-" + counter.ToString() + "." + sslRoot); @@ -303,7 +306,7 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint // Check package item with given name already exists. - if (PackageController.GetPackageItemByName(item.PackageId, item.Name, typeof(SharePointSiteCollection)) != null) + if (PackageController.GetPackageItemByName(item.PackageId, groupName, item.Name, typeof(SharePointSiteCollection)) != null) { return BusinessErrorCodes.ERROR_SHAREPOINT_PACKAGE_ITEM_EXISTS; } @@ -1012,5 +1015,17 @@ namespace WebsitePanel.EnterpriseServer.Code.SharePoint return (SecurityContext.CheckAccount(DemandAccount.NotDemo) < 0); } } + + private static bool CheckServiceItemExists(string name, int packageId) + { + bool exists = PackageController.GetPackageItemByName(packageId, ResourceGroups.SharepointFoundationServer, name, typeof(SharePointSiteCollection)) != null; + + if (!exists) + { + exists = PackageController.GetPackageItemByName(packageId, ResourceGroups.SharepointServer, name, typeof(SharePointSiteCollection)) != null; + } + + return exists; + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs index 053f0c83..c99bee6a 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esHostedSharePointServers.asmx.cs @@ -55,13 +55,14 @@ namespace WebsitePanel.EnterpriseServer /// Sort column name. /// Row index to start from. /// Maximum number of rows to retrieve. + /// Resource group name. /// Site collections in raw format. [WebMethod] public SharePointSiteCollectionListPaged GetSiteCollectionsPaged(int packageId, int organizationId, - string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows) + string filterColumn, string filterValue, string sortColumn, int startRow, int maximumRows, string groupName) { return HostedSharePointServerController.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, - sortColumn, startRow, maximumRows); + sortColumn, startRow, maximumRows, groupName); } /// @@ -71,7 +72,7 @@ namespace WebsitePanel.EnterpriseServer [WebMethod] public int[] GetSupportedLanguages(int packageId) { - return HostedSharePointServerController.GetSupportedLanguages(packageId); + return HostedSharePointServerController.GetSupportedLanguages(packageId); } /// @@ -79,11 +80,12 @@ namespace WebsitePanel.EnterpriseServer /// /// Package that owns site collections. /// A value which shows whether nested spaces must be searched as well. + /// Resource group name. /// List of found site collections. [WebMethod] - public List GetSiteCollections(int packageId, bool recursive) + public List GetSiteCollections(int packageId, bool recursive, string groupName) { - return HostedSharePointServerController.GetSiteCollections(packageId, recursive); + return HostedSharePointServerController.GetSiteCollections(packageId, recursive, groupName); } [WebMethod] @@ -114,7 +116,7 @@ namespace WebsitePanel.EnterpriseServer public SharePointSiteCollection GetSiteCollectionByDomain(int organizationId, string domain) { DomainInfo domainInfo = ServerController.GetDomain(domain); - SharePointSiteCollectionListPaged existentSiteCollections = this.GetSiteCollectionsPaged(domainInfo.PackageId, organizationId, "ItemName", String.Format("%{0}", domain), String.Empty, 0, Int32.MaxValue); + SharePointSiteCollectionListPaged existentSiteCollections = this.GetSiteCollectionsPaged(domainInfo.PackageId, organizationId, "ItemName", String.Format("%{0}", domain), String.Empty, 0, Int32.MaxValue, null); foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) { Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name); @@ -131,11 +133,12 @@ namespace WebsitePanel.EnterpriseServer /// Adds SharePoint site collection. /// /// Site collection description. + /// Resource group name. /// Created site collection id within metabase. [WebMethod] - public int AddSiteCollection(SharePointSiteCollection item) + public int AddSiteCollection(SharePointSiteCollection item, string groupName) { - return HostedSharePointServerController.AddSiteCollection(item); + return HostedSharePointServerController.AddSiteCollection(item, groupName); } /// diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs index 6471f151..7b977052 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esRemoteDesktopServices.asmx.cs @@ -39,6 +39,7 @@ using Microsoft.Web.Services3; using WebsitePanel.Providers.Common; using WebsitePanel.Providers.HostedSolution; using WebsitePanel.Providers.RemoteDesktopServices; +using WebsitePanel.EnterpriseServer.Base.RDS; namespace WebsitePanel.EnterpriseServer { @@ -367,5 +368,17 @@ namespace WebsitePanel.EnterpriseServer { return RemoteDesktopServicesController.SendRdsSetupLetter(itemId, accountId, to, cc); } + + [WebMethod] + public RdsServerSettings GetRdsServerSettings(int serverId, string settingsName) + { + return RemoteDesktopServicesController.GetRdsServerSettings(serverId, settingsName); + } + + [WebMethod] + public int UpdateRdsServerSettings(int serverId, string settingsName, RdsServerSettings settings) + { + return RemoteDesktopServicesController.UpdateRdsServerSettings(serverId, settingsName, settings); + } } } diff --git a/WebsitePanel/Sources/WebsitePanel.Server.sln b/WebsitePanel/Sources/WebsitePanel.Server.sln index 2b573470..c5af78c6 100644 --- a/WebsitePanel/Sources/WebsitePanel.Server.sln +++ b/WebsitePanel/Sources/WebsitePanel.Server.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.21005.1 +VisualStudioVersion = 12.0.30723.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Caching Application Block", "Caching Application Block", "{C8E6F2E4-A5B8-486A-A56E-92D864524682}" ProjectSection(SolutionItems) = preProject @@ -51,8 +51,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.Merak", "WebsitePanel.Providers.Mail.Merak\WebsitePanel.Providers.Mail.Merak.vbproj", "{2FA82B71-B32A-47DE-A17B-40DE08D0256D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.SharePoint.Sps20", "WebsitePanel.Providers.SharePoint.Sps20\WebsitePanel.Providers.SharePoint.Sps20.csproj", "{7980CF32-62ED-4BA1-9CAE-8EE7BD164719}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.Mail.AbilityMailServer", "WebsitePanel.Providers.Mail.AbilityMailServer\WebsitePanel.Providers.Mail.AbilityMailServer.csproj", "{54EE4293-6CCB-4859-8B76-90205F7B35A1}" EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.ArgoMail", "WebsitePanel.Providers.Mail.ArgoMail\WebsitePanel.Providers.Mail.ArgoMail.vbproj", "{FCD88E94-349D-4BB2-A726-6E47A4F01DC2}" @@ -63,8 +61,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebsitePanel.Providers.Mail.hMailServer43", "WebsitePanel.Providers.Mail.hMailServer43\WebsitePanel.Providers.Mail.hMailServer43.vbproj", "{622E452B-E1EF-4252-8039-A28C2EA25DC1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.SharePoint.Sps30", "WebsitePanel.Providers.SharePoint.Sps30\WebsitePanel.Providers.SharePoint.Sps30.csproj", "{67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.DNS.Bind", "WebsitePanel.Providers.DNS.Bind\WebsitePanel.Providers.DNS.Bind.csproj", "{3ACCBEAE-5E1E-43E5-971C-223539832DD8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebsitePanel.Providers.FTP.ServU", "WebsitePanel.Providers.FTP.ServU\WebsitePanel.Providers.FTP.ServU.csproj", "{41FEC24A-67A2-4BF4-8889-1D5CD0A2B43D}" @@ -346,16 +342,6 @@ Global {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {2FA82B71-B32A-47DE-A17B-40DE08D0256D}.Release|x86.ActiveCfg = Release|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Debug|x86.ActiveCfg = Debug|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Any CPU.Build.0 = Release|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {7980CF32-62ED-4BA1-9CAE-8EE7BD164719}.Release|x86.ActiveCfg = Release|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Any CPU.Build.0 = Debug|Any CPU {54EE4293-6CCB-4859-8B76-90205F7B35A1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU @@ -406,16 +392,6 @@ Global {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|Mixed Platforms.Build.0 = Release|Any CPU {622E452B-E1EF-4252-8039-A28C2EA25DC1}.Release|x86.ActiveCfg = Release|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Debug|x86.ActiveCfg = Debug|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Any CPU.Build.0 = Release|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {67B126AA-56E5-42F7-AC4F-AEE2A7D786F2}.Release|x86.ActiveCfg = Release|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Any CPU.Build.0 = Debug|Any CPU {3ACCBEAE-5E1E-43E5-971C-223539832DD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx index da7f2675..cbff0b24 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx @@ -5703,6 +5703,12 @@ RDS User logging off error - GEtting RDS User sessions error + Getting RDS User sessions error + + + Updating RDS User experience error + + + RDS User experience has been updated \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css index 6bb79ad7..bd1b090e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css @@ -26,7 +26,7 @@ .TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover a, .TopMenu ul.AspNet-Menu li.AspNet-Menu-Hover span {} .TopMenu ul.AspNet-Menu li ul li {margin: 0px; width: 100%;} /*.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul:before {width:0; height:0; position:absolute; content:" "; top:-8px; left:50%; margin-left:-8px; border-style:solid; border-width:0 8px 8px 8px; border-color:transparent transparent #fff transparent;}*/ -.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul {position: absolute; top: 100%; left: 0; z-index: 1000; float: left; min-width: 160px; padding: 5px 10px 5px 0; margin: -10px 0 0 0; list-style: none; font-size: 14px; background-color: #FFF; border: 1px solid #CCC; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 0; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box;} +.TopMenu .AspNet-Menu-Horizontal ul.AspNet-Menu ul {position: absolute; top: 100%; left: 0; z-index: 1000; float: left; min-width: 180px; padding: 5px 10px 5px 0; margin: -10px 0 0 0; list-style: none; font-size: 14px; background-color: #FFF; border: 1px solid #CCC; border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 0; -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); background-clip: padding-box;} .LeftMenu {font-size: 8pt;} .LeftMenu ul {background-color: #D1E9FF;} .LeftMenu ul.AspNet-Menu {width: 190px;} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/OrganizationMenu.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/OrganizationMenu.ascx.resx index cc91a936..f6644414 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/OrganizationMenu.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/OrganizationMenu.ascx.resx @@ -202,7 +202,7 @@ Setup - SharePoint Foundation Server + SharePoint Foundation SharePoint Server diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsRdsPolicy.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsRdsPolicy.ascx.resx new file mode 100644 index 00000000..91b50033 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsRdsPolicy.ascx.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrators + + + Users + + + Drive Space Threshold + + + Hide C: Drive + + + Remove "Powershell" Command + + + Remove "Run" Command + + + Disable Screen Saver + + + Remove Shutdown and Restart + + + Disable Task Manager + + + Lock Screen Timeout + + + Changing Desktop Disabled + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountPolicySettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountPolicySettings.ascx.resx index 69f57eb1..5dee42e1 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountPolicySettings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountPolicySettings.ascx.resx @@ -147,6 +147,9 @@ Virtual Private Servers Policy + + Remote Desktop Servers Policy + WEB Policy diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/HostedSharePointSiteCollectionsHelper.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/HostedSharePointSiteCollectionsHelper.cs index 6f0dd712..50a0078e 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/HostedSharePointSiteCollectionsHelper.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/Code/Helpers/HostedSharePointSiteCollectionsHelper.cs @@ -37,6 +37,7 @@ using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using WebsitePanel.Providers.SharePoint; using System.Collections.Generic; +using WebsitePanel.EnterpriseServer; namespace WebsitePanel.Portal { @@ -44,19 +45,28 @@ namespace WebsitePanel.Portal { SharePointSiteCollectionListPaged result; - public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string filterColumn, string filterValue) + public int GetSharePointSiteCollectionPagedCount(int packageId, int organizationId, string groupName, string filterColumn, string filterValue) { return result.TotalRowCount; } - public List GetSharePointSiteCollectionPaged(int packageId, int organizationId, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn) + public List GetSharePointSiteCollectionPaged(int packageId, int organizationId, string groupName, string filterColumn, string filterValue, int maximumRows, int startRowIndex, string sortColumn) { if (!String.IsNullOrEmpty(filterValue)) { filterValue = filterValue + "%"; } - result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows); + if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName)) + { + groupName = ResourceGroups.SharepointFoundationServer; + } + else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName)) + { + groupName = ResourceGroups.SharepointServer; + } + + result = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(packageId, organizationId, filterColumn, filterValue, sortColumn, startRowIndex, maximumRows, groupName); return result.SiteCollections; } diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx index 66d28e5b..6563c74a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/Menu.ascx.resx @@ -166,7 +166,7 @@ Setup - SharePoint Foundation Server + SharePoint Foundation SharePoint Server diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs index e87365b0..4171ea68 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointBackupSiteCollection.ascx.cs @@ -61,6 +61,10 @@ namespace WebsitePanel.Portal } } + public static string GroupName + { + get { return HttpContext.Current.Request["GroupName"]; } + } protected void Page_Load(object sender, EventArgs e) { @@ -163,7 +167,7 @@ namespace WebsitePanel.Portal private void RedirectBack() { - HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); + HttpContext.Current.Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName)); } protected void chkZipBackup_CheckedChanged(object sender, EventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs index c4fc460a..0a35bcfc 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointEditSiteCollection.ascx.cs @@ -30,6 +30,7 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Web; using System.Web.UI.WebControls; using WebsitePanel.EnterpriseServer; using WebsitePanel.Providers.DNS; @@ -43,6 +44,11 @@ namespace WebsitePanel.Portal { SharePointSiteCollection item = null; + public static string GroupName + { + get { return HttpContext.Current.Request["GroupName"]; } + } + private int OrganizationId { get @@ -224,7 +230,7 @@ namespace WebsitePanel.Portal /// Reserved disk space vallue. private int GetReservedDiskStorageSpace() { - var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false); + var existingCollections = ES.Services.HostedSharePointServers.GetSiteCollections(PanelSecurity.PackageId, false, GroupName); return (int)existingCollections.Sum(siteCollection => siteCollection.MaxSiteStorage); } @@ -251,9 +257,20 @@ namespace WebsitePanel.Portal { item = new SharePointSiteCollection(); - if (!UseSharedSLL(PanelSecurity.PackageId)) + string groupName = GroupName; + + if (ResourceGroups.SharepointFoundationServer.Replace(" ", "").Equals(groupName)) { - SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue); + groupName = ResourceGroups.SharepointFoundationServer; + } + else if (ResourceGroups.SharepointServer.Replace(" ", "").Equals(groupName)) + { + groupName = ResourceGroups.SharepointServer; + } + + if (!UseSharedSLL(PanelSecurity.PackageId)) + { + SharePointSiteCollectionListPaged existentSiteCollections = ES.Services.HostedSharePointServers.GetSiteCollectionsPaged(PanelSecurity.PackageId, this.OrganizationId, "ItemName", String.Format("%{0}", this.domain.DomainName), String.Empty, 0, Int32.MaxValue, groupName); foreach (SharePointSiteCollection existentSiteCollection in existentSiteCollections.SiteCollections) { Uri existentSiteCollectionUri = new Uri(existentSiteCollection.Name); @@ -284,9 +301,9 @@ namespace WebsitePanel.Portal item.MaxSiteStorage = maxStorage.QuotaValue; - item.WarningStorage = warningStorage.QuotaValue; + item.WarningStorage = warningStorage.QuotaValue; - int result = ES.Services.HostedSharePointServers.AddSiteCollection(item); + int result = ES.Services.HostedSharePointServers.AddSiteCollection(item, groupName); if (result < 0) { localMessageBox.ShowResultMessage(result); @@ -373,19 +390,19 @@ namespace WebsitePanel.Portal protected void btnBackup_Click(object sender, EventArgs e) { - Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); + Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_backup_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName)); } protected void btnRestore_Click(object sender, EventArgs e) { - Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); + Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_restore_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName)); } private void RedirectToSiteCollectionsList() { - Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString())); + Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_sitecollections", "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName)); } private bool UseSharedSLL(int packageID) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs index b91e7606..74c9be70 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointRestoreSiteCollection.ascx.cs @@ -59,6 +59,11 @@ namespace WebsitePanel.Portal } } + public static string GroupName + { + get { return HttpContext.Current.Request["GroupName"]; } + } + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) @@ -166,7 +171,7 @@ namespace WebsitePanel.Portal private void RedirectBack() { - Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString())); + Response.Redirect(EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + this.SiteCollectionId, "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName)); } protected void radioUpload_CheckedChanged(object sender, EventArgs e) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx index 05459837..a1734e43 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx @@ -76,6 +76,7 @@ function confirmation() + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs index 3b0c4cb3..0bd9b7b0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.cs @@ -44,6 +44,11 @@ namespace WebsitePanel.Portal { public partial class HostedSharePointSiteCollections : WebsitePanelModuleBase { + public static string GroupName + { + get { return HttpContext.Current.Request["GroupName"]; } + } + protected void Page_Load(object sender, EventArgs e) { this.BindStats(); @@ -62,14 +67,14 @@ namespace WebsitePanel.Portal protected void btnCreateSiteCollection_Click(object sender, EventArgs e) { - Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString())); + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "sharepoint_edit_sitecollection", "SpaceID=" + PanelSecurity.PackageId.ToString(), "GroupName=" + GroupName)); } public string GetSiteCollectionEditUrl(string siteCollectionId) { return EditUrl("SpaceID", PanelSecurity.PackageId.ToString(), "sharepoint_edit_sitecollection", "SiteCollectionID=" + siteCollectionId, - "ItemID=" + PanelRequest.ItemID.ToString()); + "ItemID=" + PanelRequest.ItemID.ToString(), "GroupName=" + GroupName); } protected void odsSharePointSiteCollectionPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs index d8c16907..2e8763e8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/HostedSharePointSiteCollections.ascx.designer.cs @@ -1,31 +1,3 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx new file mode 100644 index 00000000..91b50033 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/App_LocalResources/RDSEditUserExperience.ascx.resx @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Administrators + + + Users + + + Drive Space Threshold + + + Hide C: Drive + + + Remove "Powershell" Command + + + Remove "Run" Command + + + Disable Screen Saver + + + Remove Shutdown and Restart + + + Disable Task Manager + + + Lock Screen Timeout + + + Changing Desktop Disabled + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx new file mode 100644 index 00000000..cb177a39 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx @@ -0,0 +1,163 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RDSEditUserExperience.ascx.cs" Inherits="WebsitePanel.Portal.RDS.RDSEditUserExperience" %> +<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %> +<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %> +<%@ Register Src="UserControls/RDSCollectionTabs.ascx" TagName="CollectionTabs" TagPrefix="wsp" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="../UserControls/CollapsiblePanel.ascx" %> +<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %> + + + + +
+
+
+
+
+
+
+ + + - + +
+
+ + + + + + + + + + + + + +
+ +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + +
+ +
+
+
+
+ +
+
+
+
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.cs new file mode 100644 index 00000000..8fcb7797 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.cs @@ -0,0 +1,142 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.EnterpriseServer.Base.RDS; + +namespace WebsitePanel.Portal.RDS +{ + public partial class RDSEditUserExperience : WebsitePanelModuleBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + var collection = ES.Services.RDS.GetRdsCollection(PanelRequest.CollectionID); + litCollectionName.Text = collection.DisplayName; + BindSettings(); + } + } + + private void BindSettings() + { + var serverSettings = ES.Services.RDS.GetRdsServerSettings(PanelRequest.CollectionID, string.Format("Collection-{0}-Settings", PanelRequest.CollectionID)); + + if (serverSettings == null) + { + var defaultSettings = ES.Services.Users.GetUserSettings(PanelSecurity.LoggedUserId, UserSettings.RDS_POLICY); + BindDefaultSettings(defaultSettings); + } + else + { + BindSettings(serverSettings); + } + } + + private void BindSettings(RdsServerSettings settings) + { + + } + + private RdsServerSettings GetSettings() + { + //settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE] = txtTimeout.Text; + //settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS] = cbTimeoutAdministrators.Checked.ToString(); + //settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS] = cbTimeoutUsers.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS] = cbRunCommandAdministrators.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS] = cbRunCommandUsers.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS] = cbPowershellAdministrators.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS] = cbPowershellUsers.Checked.ToString(); + //settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS] = cbHideCDriveAdministrators.Checked.ToString(); + //settings[RdsServerSettings.HIDE_C_DRIVE_USERS] = cbHideCDriveUsers.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS] = cbShutdownAdministrators.Checked.ToString(); + //settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS] = cbShutdownUsers.Checked.ToString(); + //settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS] = cbTaskManagerAdministrators.Checked.ToString(); + //settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS] = cbTaskManagerUsers.Checked.ToString(); + //settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS] = cbDesktopAdministrators.Checked.ToString(); + //settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS] = cbDesktopUsers.Checked.ToString(); + //settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS] = cbScreenSaverAdministrators.Checked.ToString(); + //settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS] = cbScreenSaverUsers.Checked.ToString(); + //settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE] = txtThreshold.Text; + + var settings = new RdsServerSettings(); + //settings.Settings.Add(new RdsServerSetting{ + // PropertyName = RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE, + // PropertyValue = txtTimeout.Text + //}) + + return settings; + } + + private void BindDefaultSettings(UserSettings settings) + { + txtTimeout.Text = settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE]; + cbTimeoutAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS]); + cbTimeoutUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS]); + + cbRunCommandAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS]); + cbRunCommandUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS]); + + cbPowershellAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS]); + cbPowershellUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS]); + + cbHideCDriveAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS]); + cbHideCDriveUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_USERS]); + + cbShutdownAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS]); + cbShutdownUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS]); + + cbTaskManagerAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS]); + cbTaskManagerUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS]); + + cbDesktopAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS]); + cbDesktopUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS]); + + cbScreenSaverAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS]); + cbScreenSaverUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS]); + + txtThreshold.Text = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE]; + } + + private bool SaveServerSettings() + { + try + { + ES.Services.RDS.UpdateRdsServerSettings(PanelRequest.CollectionID, string.Format("Collection-{0}-Settings", PanelRequest.CollectionID), GetSettings()); + } + catch (Exception ex) + { + ShowErrorMessage("RDSLOCALADMINS_NOT_ADDED", ex); + return false; + } + + return true; + } + + protected void btnSave_Click(object sender, EventArgs e) + { + if (!Page.IsValid) + { + return; + } + + SaveServerSettings(); + } + + protected void btnSaveExit_Click(object sender, EventArgs e) + { + if (!Page.IsValid) + { + return; + } + + if (SaveServerSettings()) + { + Response.Redirect(EditUrl("ItemID", PanelRequest.ItemID.ToString(), "rds_collections", "SpaceID=" + PanelSecurity.PackageId)); + } + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.designer.cs new file mode 100644 index 00000000..a743b041 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/RDSEditUserExperience.ascx.designer.cs @@ -0,0 +1,402 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal.RDS { + + + public partial class RDSEditUserExperience { + + /// + /// asyncTasks control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks; + + /// + /// imgEditRDSCollection control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Image imgEditRDSCollection; + + /// + /// locTitle control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Localize locTitle; + + /// + /// litCollectionName control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Literal litCollectionName; + + /// + /// messageBox control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox; + + /// + /// tabs control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.RDS.UserControls.RdsServerTabs tabs; + + /// + /// secTimeout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secTimeout; + + /// + /// timeoutPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel timeoutPanel; + + /// + /// txtTimeout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtTimeout; + + /// + /// cbTimeoutUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTimeoutUsers; + + /// + /// cbTimeoutAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTimeoutAdministrators; + + /// + /// secRunCommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secRunCommand; + + /// + /// runCommandPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel runCommandPanel; + + /// + /// cbRunCommandUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbRunCommandUsers; + + /// + /// cbRunCommandAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbRunCommandAdministrators; + + /// + /// secPowershellCommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPowershellCommand; + + /// + /// powershellCommandPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel powershellCommandPanel; + + /// + /// cbPowershellUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbPowershellUsers; + + /// + /// cbPowershellAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbPowershellAdministrators; + + /// + /// secHideCDrive control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secHideCDrive; + + /// + /// hideCDrivePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel hideCDrivePanel; + + /// + /// cbHideCDriveUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveUsers; + + /// + /// cbHideCDriveAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveAdministrators; + + /// + /// secShutdown control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secShutdown; + + /// + /// shutdownPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel shutdownPanel; + + /// + /// cbShutdownUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShutdownUsers; + + /// + /// cbShutdownAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShutdownAdministrators; + + /// + /// secTaskManager control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secTaskManager; + + /// + /// taskManagerPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel taskManagerPanel; + + /// + /// cbTaskManagerUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerUsers; + + /// + /// cbTaskManagerAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerAdministrators; + + /// + /// secChangeDesktop control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secChangeDesktop; + + /// + /// desktopPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel desktopPanel; + + /// + /// cbDesktopUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDesktopUsers; + + /// + /// cbDesktopAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDesktopAdministrators; + + /// + /// secScreenSaver control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secScreenSaver; + + /// + /// screenSaverPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel screenSaverPanel; + + /// + /// cbScreenSaverUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverUsers; + + /// + /// cbScreenSaverAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverAdministrators; + + /// + /// secDriveSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDriveSpace; + + /// + /// driveSpacePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel driveSpacePanel; + + /// + /// txtThreshold control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtThreshold; + + /// + /// buttonPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.ItemButtonPanel buttonPanel; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx index 2cd1fa14..59445e3d 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/App_LocalResources/RDSCollectionTabs.ascx.resx @@ -138,4 +138,7 @@ Setup Instructions + + User Experience + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs index f57fd491..57e12294 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/RDS/UserControls/RDSCollectionTabs.ascx.cs @@ -26,7 +26,8 @@ namespace WebsitePanel.Portal.RDS.UserControls tabsList.Add(CreateTab("rds_collection_edit_users", "Tab.RdsUsers")); tabsList.Add(CreateTab("rds_collection_user_sessions", "Tab.UserSessions")); tabsList.Add(CreateTab("rds_collection_local_admins", "Tab.LocalAdmins")); - tabsList.Add(CreateTab("rds_setup_letter", "Tab.RdsSetupLetter")); + tabsList.Add(CreateTab("rds_collection_user_experience", "Tab.UserExperience")); + tabsList.Add(CreateTab("rds_setup_letter", "Tab.RdsSetupLetter")); int idx = 0; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx new file mode 100644 index 00000000..5b860eef --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx @@ -0,0 +1,131 @@ +<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsRdsPolicy.ascx.cs" Inherits="WebsitePanel.Portal.SettingsRdsPolicy" %> +<%@ Register TagPrefix="wsp" TagName="CollapsiblePanel" Src="UserControls/CollapsiblePanel.ascx" %> + + + + + + + + + + + +
+ +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + + +
+ + + +
+
+
+ + + + + + +
+ +
+
+
\ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs new file mode 100644 index 00000000..c7cc46ff --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using WebsitePanel.EnterpriseServer; +using WebsitePanel.EnterpriseServer.Base.RDS; + +namespace WebsitePanel.Portal +{ + public partial class SettingsRdsPolicy : WebsitePanelControlBase, IUserSettingsEditorControl + { + public void BindSettings(UserSettings settings) + { + txtTimeout.Text = settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE]; + cbTimeoutAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS]); + cbTimeoutUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS]); + + cbRunCommandAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS]); + cbRunCommandUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS]); + + cbPowershellAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS]); + cbPowershellUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS]); + + cbHideCDriveAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS]); + cbHideCDriveUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.HIDE_C_DRIVE_USERS]); + + cbShutdownAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS]); + cbShutdownUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS]); + + cbTaskManagerAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS]); + cbTaskManagerUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS]); + + cbDesktopAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS]); + cbDesktopUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS]); + + cbScreenSaverAdministrators.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS]); + cbScreenSaverUsers.Checked = Convert.ToBoolean(settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS]); + + txtThreshold.Text = settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE]; + } + + public void SaveSettings(UserSettings settings) + { + settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_VALUE] = txtTimeout.Text; + settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_ADMINISTRATORS] = cbTimeoutAdministrators.Checked.ToString(); + settings[RdsServerSettings.LOCK_SCREEN_TIMEOUT_USERS] = cbTimeoutUsers.Checked.ToString(); + settings[RdsServerSettings.REMOVE_RUN_COMMAND_ADMINISTRATORS] = cbRunCommandAdministrators.Checked.ToString(); + settings[RdsServerSettings.REMOVE_RUN_COMMAND_USERS] = cbRunCommandUsers.Checked.ToString(); + settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_ADMINISTRATORS] = cbPowershellAdministrators.Checked.ToString(); + settings[RdsServerSettings.REMOVE_POWERSHELL_COMMAND_USERS] = cbPowershellUsers.Checked.ToString(); + settings[RdsServerSettings.HIDE_C_DRIVE_ADMINISTRATORS] = cbHideCDriveAdministrators.Checked.ToString(); + settings[RdsServerSettings.HIDE_C_DRIVE_USERS] = cbHideCDriveUsers.Checked.ToString(); + settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_ADMINISTRATORS] = cbShutdownAdministrators.Checked.ToString(); + settings[RdsServerSettings.REMOVE_SHUTDOWN_RESTART_USERS] = cbShutdownUsers.Checked.ToString(); + settings[RdsServerSettings.DISABLE_TASK_MANAGER_ADMINISTRATORS] = cbTaskManagerAdministrators.Checked.ToString(); + settings[RdsServerSettings.DISABLE_TASK_MANAGER_USERS] = cbTaskManagerUsers.Checked.ToString(); + settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_ADMINISTRATORS] = cbDesktopAdministrators.Checked.ToString(); + settings[RdsServerSettings.CHANGE_DESKTOP_DISABLED_USERS] = cbDesktopUsers.Checked.ToString(); + settings[RdsServerSettings.SCREEN_SAVER_DISABLED_ADMINISTRATORS] = cbScreenSaverAdministrators.Checked.ToString(); + settings[RdsServerSettings.SCREEN_SAVER_DISABLED_USERS] = cbScreenSaverUsers.Checked.ToString(); + settings[RdsServerSettings.DRIVE_SPACE_THRESHOLD_VALUE] = txtThreshold.Text; + } + } +} \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs new file mode 100644 index 00000000..ab5d3f15 --- /dev/null +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsRdsPolicy.ascx.designer.cs @@ -0,0 +1,339 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebsitePanel.Portal { + + + public partial class SettingsRdsPolicy { + + /// + /// secTimeout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secTimeout; + + /// + /// timeoutPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel timeoutPanel; + + /// + /// txtTimeout control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtTimeout; + + /// + /// cbTimeoutUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTimeoutUsers; + + /// + /// cbTimeoutAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTimeoutAdministrators; + + /// + /// secRunCommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secRunCommand; + + /// + /// runCommandPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel runCommandPanel; + + /// + /// cbRunCommandUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbRunCommandUsers; + + /// + /// cbRunCommandAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbRunCommandAdministrators; + + /// + /// secPowershellCommand control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secPowershellCommand; + + /// + /// powershellCommandPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel powershellCommandPanel; + + /// + /// cbPowershellUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbPowershellUsers; + + /// + /// cbPowershellAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbPowershellAdministrators; + + /// + /// secHideCDrive control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secHideCDrive; + + /// + /// hideCDrivePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel hideCDrivePanel; + + /// + /// cbHideCDriveUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveUsers; + + /// + /// cbHideCDriveAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbHideCDriveAdministrators; + + /// + /// secShutdown control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secShutdown; + + /// + /// shutdownPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel shutdownPanel; + + /// + /// cbShutdownUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShutdownUsers; + + /// + /// cbShutdownAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbShutdownAdministrators; + + /// + /// secTaskManager control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secTaskManager; + + /// + /// taskManagerPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel taskManagerPanel; + + /// + /// cbTaskManagerUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerUsers; + + /// + /// cbTaskManagerAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbTaskManagerAdministrators; + + /// + /// secChangeDesktop control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secChangeDesktop; + + /// + /// desktopPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel desktopPanel; + + /// + /// cbDesktopUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDesktopUsers; + + /// + /// cbDesktopAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbDesktopAdministrators; + + /// + /// secScreenSaver control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secScreenSaver; + + /// + /// screenSaverPanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel screenSaverPanel; + + /// + /// cbScreenSaverUsers control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverUsers; + + /// + /// cbScreenSaverAdministrators control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.CheckBox cbScreenSaverAdministrators; + + /// + /// secDriveSpace control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::WebsitePanel.Portal.CollapsiblePanel secDriveSpace; + + /// + /// driveSpacePanel control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Panel driveSpacePanel; + + /// + /// txtThreshold control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtThreshold; + } +} diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx index 1ea55968..89b1b10b 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx @@ -63,6 +63,10 @@ +
  • + +
  • diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx.designer.cs index 708f59a5..4f52623a 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountPolicySettings.ascx.designer.cs @@ -1,31 +1,3 @@ -// Copyright (c) 2015, Outercurve Foundation. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, -// are permitted provided that the following conditions are met: -// -// - Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// -// - Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimer in the documentation -// and/or other materials provided with the distribution. -// -// - Neither the name of the Outercurve Foundation nor the names of its -// contributors may be used to endorse or promote products derived from this -// software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR -// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - //------------------------------------------------------------------------------ // // This code was generated by a tool. @@ -175,6 +147,15 @@ namespace WebsitePanel.Portal { /// protected global::System.Web.UI.WebControls.HyperLink lnkVpsPolicy; + /// + /// lnkRdsPolicy control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.HyperLink lnkRdsPolicy; + /// /// btnCancel control. /// diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs index 6c5f08d9..95925257 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/OrganizationMenuControl.cs @@ -96,10 +96,10 @@ namespace WebsitePanel.Portal.UserControls //SharePoint menu group; if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointFoundationServer)) - PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup")); + PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointFoundationServerGroup"), ResourceGroups.SharepointFoundationServer.Replace(" ", "")); if (Cntx.Groups.ContainsKey(ResourceGroups.SharepointServer)) - PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointServerGroup")); + PrepareSharePointMenuRoot(items, GetLocalizedString("Text.SharePointServerGroup"), ResourceGroups.SharepointServer.Replace(" ", "")); //CRM Menu if (Cntx.Groups.ContainsKey(ResourceGroups.HostedCRM2013)) @@ -362,11 +362,11 @@ namespace WebsitePanel.Portal.UserControls bbItems.Add(CreateMenuItem("BlackBerryUsers", "blackberry_users", @"Icons/blackberry_users_48.png")); } - private void PrepareSharePointMenuRoot(MenuItemCollection items, string menuItemText) + private void PrepareSharePointMenuRoot(MenuItemCollection items, string menuItemText, string group) { if (ShortMenu) { - PrepareSharePointMenu(items); + PrepareSharePointMenu(items, group); } else { @@ -374,7 +374,7 @@ namespace WebsitePanel.Portal.UserControls item.Selectable = false; - PrepareSharePointMenu(item.ChildItems); + PrepareSharePointMenu(item.ChildItems, group); if (item.ChildItems.Count > 0) { @@ -383,14 +383,28 @@ namespace WebsitePanel.Portal.UserControls } } - private void PrepareSharePointMenu(MenuItemCollection spItems) + private void PrepareSharePointMenu(MenuItemCollection spItems, string group) + { + spItems.Add(CreateSharepointMenuItem("Text.SiteCollections", "sharepoint_sitecollections", @"Icons/sharepoint_sitecollections_48.png", group)); + spItems.Add(CreateSharepointMenuItem("Text.StorageUsage", "sharepoint_storage_usage", @"Icons/sharepoint_storage_usage_48.png", group)); + spItems.Add(CreateSharepointMenuItem("Text.StorageLimits", "sharepoint_storage_settings", @"Icons/sharepoint_storage_settings_48.png", group)); + } + + private MenuItem CreateSharepointMenuItem(string text, string key, string img, string group) { - spItems.Add(CreateMenuItem("SiteCollections", "sharepoint_sitecollections", @"Icons/sharepoint_sitecollections_48.png")); + MenuItem item = new MenuItem(); + string PID_SPACE_EXCHANGE_SERVER = "SpaceExchangeServer"; + item.Text = GetLocalizedString(text); + item.NavigateUrl = PortalUtils.NavigatePageURL(PID_SPACE_EXCHANGE_SERVER, "ItemID", ItemID.ToString(), + PortalUtils.SPACE_ID_PARAM + "=" + PackageId, DefaultPage.CONTROL_ID_PARAM + "=" + key, "GroupName=" + group, + "moduleDefId=exchangeserver"); - //if (ShortMenu) return; + if (ShowImg) + { + item.ImageUrl = PortalUtils.GetThemedIcon(img); + } - spItems.Add(CreateMenuItem("StorageUsage", "sharepoint_storage_usage", @"Icons/sharepoint_storage_usage_48.png")); - spItems.Add(CreateMenuItem("StorageLimits", "sharepoint_storage_settings", @"Icons/sharepoint_storage_settings_48.png")); + return item; } private void PrepareOCSMenuRoot(MenuItemCollection items) diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj index 388618e7..50cbc343 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj @@ -443,6 +443,13 @@ RDSCollections.ascx + + RDSEditUserExperience.ascx + ASPXCodeBehind + + + RDSEditUserExperience.ascx + RDSLocalAdmins.ascx ASPXCodeBehind @@ -532,6 +539,13 @@ SettingsDomainLookupLetter.ascx + + SettingsRdsPolicy.ascx + ASPXCodeBehind + + + SettingsRdsPolicy.ascx + SettingsRdsSetupLetter.ascx ASPXCodeBehind @@ -4575,9 +4589,15 @@ + Designer + + Designer + + Designer + Designer @@ -4592,6 +4612,7 @@ + @@ -4619,6 +4640,7 @@ + ResXFileCodeGenerator DomainLookupView.ascx.Designer.cs @@ -4627,6 +4649,7 @@ +