diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql index e7bbfa49..8019ce30 100644 --- a/WebsitePanel/Database/update_db.sql +++ b/WebsitePanel/Database/update_db.sql @@ -3210,22 +3210,26 @@ GO IF EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroupManagement' AND [QuotaID] = 423) BEGIN + UPDATE [dbo].[Quotas] + SET [QuotaDescription] = N'Security Groups', + [QuotaName] = N'HostedSolution.SecurityGroups', + [QuotaTypeID] = 2 + WHERE [QuotaID] = 423 -UPDATE [dbo].[Quotas] -SET [QuotaDescription] = N'Security Groups', - [QuotaName] = N'HostedSolution.SecurityGroups', - [QuotaTypeID] = 2 -WHERE [QuotaID] = 423 - -UPDATE [dbo].[HostingPlanQuotas] -SET [QuotaValue] = -1 -WHERE [QuotaID] = 423 - -UPDATE [dbo].[PackageQuotas] -SET [QuotaValue] = -1 -WHERE [QuotaID] = 423 + UPDATE [dbo].[HostingPlanQuotas] + SET [QuotaValue] = -1 + WHERE [QuotaID] = 423 + UPDATE [dbo].[PackageQuotas] + SET [QuotaValue] = -1 + WHERE [QuotaID] = 423 END +ELSE + BEGIN + --add Security Groups Quota + IF NOT EXISTS (SELECT * FROM [dbo].[Quotas] WHERE [QuotaName] = 'HostedSolution.SecurityGroups') + INSERT [dbo].[Quotas] ([QuotaID], [GroupID],[QuotaOrder], [QuotaName], [QuotaDescription], [QuotaTypeID], [ServiceQuota], [ItemTypeID], [HideQuota]) VALUES (423, 13, 5, N'HostedSolution.SecurityGroups', N'Security Groups', 2, 0, NULL, NULL) + END GO IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'GetOrganizationStatistics') diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs index 4de147bd..31456752 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Tasks/TaskManager.cs @@ -412,7 +412,7 @@ namespace WebsitePanel.EnterpriseServer static void PurgeCompletedTasks(object obj) { - List tasks = TaskController.GetTasks(); + List tasks = TaskController.GetProcessTasks(BackgroundTaskStatus.Run); foreach (BackgroundTask task in tasks) { diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs index cf933303..4521e180 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/Common/Constants.cs @@ -66,6 +66,10 @@ namespace WebsitePanel.Providers.Common public const string UtilityPath = "UtilityPath"; + public const string HandheldcleanupPath = "HandheldcleanupPath"; + + public const string MAPIProfile = "MAPIProfile"; + public const string EnterpriseServer = "EnterpriseServer"; public const string EnterpriseServerFQDN = "EnterpriseServerFQDN"; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs index cfdd0bef..3d6347a1 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/BlackBerryErrorsCodes.cs @@ -42,6 +42,8 @@ public const string CANNOT_EXECUTE_COMMAND = "CANNOT_EXECUTE_COMMAND"; + public const string CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP = "CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP"; + public const string CANNOT_GET_BLACKBERRY_PROXY = "CANNOT_GET_BLACKBERRY_PROXY"; public const string CANNOT_ADD_BLACKBERRY_USER = "CANNOT_ADD_BLACKBERRY_USER"; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs index 04242ff4..bb9f43ab 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.EnterpriseStorage.Windows2012/Windows2012.cs @@ -344,7 +344,8 @@ namespace WebsitePanel.Providers.EnterpriseStorage public override bool IsInstalled() { Server.Utils.OS.WindowsVersion version = WebsitePanel.Server.Utils.OS.GetVersion(); - return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012; + return version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012 || + version == WebsitePanel.Server.Utils.OS.WindowsVersion.WindowsServer2012R2; } protected WebDavSetting GetWebDavSetting(WebDavSetting setting) diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs index 961d6c7f..cdd47dad 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerry5Provider.cs @@ -65,7 +65,9 @@ namespace WebsitePanel.Providers.HostedSolution ResultObject res = HostedSolutionLog.StartLog("CreateBlackBerryUser5Internal"); string file = Path.Combine(UtilityPath, "besuseradminclient.exe"); + string file2 = Path.Combine(HandheldcleanupPath, "handheldcleanup.exe"); + //Add user to Blackberry Server if (!File.Exists(file)) { HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.FILE_PATH_IS_INVALID); @@ -79,10 +81,12 @@ namespace WebsitePanel.Providers.HostedSolution EnterpriseServer, EnterpriseServerFQDN); - try + //run besuseradminclient.exe + + try { string output; - + int exitCode = Execute(file, arguments, out output); if (exitCode == 0) { @@ -93,15 +97,46 @@ namespace WebsitePanel.Providers.HostedSolution { throw new ApplicationException( - string.Format("Excit code is not 0. {0}, ExitCode = {1}", output, exitCode)); + string.Format("Exit code is not 0. {0}, ExitCode = {1}", output, exitCode)); } } + catch (Exception ex) { HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND, ex); return res; } + //run handheldcleanup.exe + if (File.Exists(file2)) + { + + string arguments2 = string.Format("-u -p {0}", + MAPIProfile); + try + { + string output; + + int exitCode = Execute2(file2, arguments2, out output); + if (exitCode == 0) + { + Log.WriteInfo(output); + + } + else + { + + throw new ApplicationException( + string.Format("Exit code is not 0. {0}, ExitCode = {1}", arguments2, output, exitCode)); + } + } + + catch (Exception ex) + { + HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal", res, BlackBerryErrorsCodes.CANNOT_EXECUTE_COMMAND_HANDHELDCLEANUP, ex); + return res; + } + } HostedSolutionLog.EndLog("CreateBlackBerry5UserInternal"); return res; diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs index 44ba70f4..49ba3eba 100644 --- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs +++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/BlackBerryProvider.cs @@ -50,7 +50,20 @@ namespace WebsitePanel.Providers.HostedSolution return ProviderSettings[Constants.UtilityPath]; } } - + public string HandheldcleanupPath + { + get + { + return ProviderSettings[Constants.HandheldcleanupPath]; + } + } + public string MAPIProfile + { + get + { + return ProviderSettings[Constants.MAPIProfile]; + } + } public string Password { get @@ -172,6 +185,53 @@ namespace WebsitePanel.Providers.HostedSolution return res; } + protected int Execute2(string file, string arguments, out string output, out string error) + { + string oldDir = Directory.GetCurrentDirectory(); + Directory.SetCurrentDirectory(HandheldcleanupPath); + ProcessStartInfo startInfo = new ProcessStartInfo(file, arguments); + + startInfo.UseShellExecute = false; + startInfo.RedirectStandardError = true; + startInfo.RedirectStandardOutput = true; + startInfo.RedirectStandardInput = true; + startInfo.CreateNoWindow = true; + startInfo.WindowStyle = ProcessWindowStyle.Hidden; + + Process proc = Process.Start(startInfo); + + StreamWriter inputWriter = proc.StandardInput; + inputWriter.WriteLine(EnterpriseServer); + inputWriter.Flush(); + inputWriter.Close(); + + if (proc == null) + throw new ApplicationException("Proc is null."); + + StreamReader outputReader = proc.StandardOutput; + output = outputReader.ReadToEnd(); + + StreamReader errorReader = proc.StandardError; + error = errorReader.ReadToEnd(); + + Directory.SetCurrentDirectory(oldDir); + return proc.ExitCode; + } + + protected int Execute2(string file, string arguments, out string output) + { + Log.WriteInfo(file); + Log.WriteInfo(arguments); + + string outputData; + string errorData; + int res = Execute2(file, arguments, out outputData, out errorData); + + output = outputData.Length > 0 ? "Output stream:" + outputData : string.Empty; + output += errorData.Length > 0 ? "Error stream:" + errorData : string.Empty; + + return res; + } public ResultObject DeleteBlackBerryUser(string primaryEmailAddress) { diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config index 7c5b9a14..df21e889 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Pages.config @@ -588,6 +588,9 @@ + + + @@ -638,11 +641,21 @@ + + + + + + + + + + @@ -652,26 +665,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx index e88e64b9..8be359f9 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Skins/Default/Browse1.ascx @@ -31,9 +31,11 @@ - +
- + + +
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png new file mode 100644 index 00000000..3139668f Binary files /dev/null and b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Images/Exchange/home24.png differ 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 540bac6b..386c7bc4 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Themes/Default/Styles/Menus.css @@ -15,10 +15,15 @@ .TopMenu ul.AspNet-Menu ul ul { - top: -0.3em; + top: -1em; z-index: 502; } +.TopMenu ul.AspNet-Menu li ul li.AspNet-Menu-WithChildren +{ + cursor: pointer; +} + .TopMenu ul.AspNet-Menu li ul li.AspNet-Menu-WithChildren span { color: #000000 !important; @@ -47,6 +52,16 @@ background-image: none !important; } +.TopMenu li.AspNet-Menu-Leaf a img +{ + border-style:None; + height:16px; + width:16px; + border-width:0px; + padding-right: 3px; + position:relative; +} + /* .TopMenu ul.AspNet-Menu li { @@ -66,7 +81,6 @@ .TopMenu ul.AspNet-Menu li span { - cursor: pointer; color: #ffffff; padding: 8px 25px 8px 15px; background: transparent url(../Images/menu_popup.gif) right center no-repeat; diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs index b01c53fb..e63c55d8 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/OrganizationMenu.ascx.cs @@ -67,7 +67,7 @@ namespace WebsitePanel.Portal MenuItem item = new MenuItem( GetLocalizedString("Text.OrganizationHome"), "", - "", + imagePath + "home24.png", PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(), "organization_home", "SpaceID=" + PanelSecurity.PackageId)); items.Add(item); diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx index c488c21d..53e4e1e2 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/App_LocalResources/BlackBerry5_Settings.ascx.resx @@ -123,6 +123,12 @@ BlackBerry Enterprise Server FQDN: + + handheldcleanup.exe utility Path: + + + BlackBerry MAPI Profile: + Authentication password: diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx index 517212cc..52416d61 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx @@ -6,16 +6,21 @@ + + + + + + + - + - - @@ -39,5 +44,12 @@ + + + + + + + \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs index 2eb7ecbb..b88abed0 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.cs @@ -42,9 +42,11 @@ namespace WebsitePanel.Portal.ProviderControls public void BindSettings(StringDictionary settings) { txtPath.Text = settings[Constants.UtilityPath]; + txtHandheldcleanupPath.Text = settings[Constants.HandheldcleanupPath]; txtPassword.Text = settings[Constants.Password]; txtEnterpriseServer.Text = settings[Constants.EnterpriseServer]; txtEnterpriseServerFQDN.Text = settings[Constants.EnterpriseServerFQDN]; + txtMAPIProfile.Text = settings[Constants.MAPIProfile]; ViewState["PWD"] = settings[Constants.Password]; txtUser.Text = settings[Constants.UserName]; } @@ -52,10 +54,12 @@ namespace WebsitePanel.Portal.ProviderControls public void SaveSettings(StringDictionary settings) { settings[Constants.UtilityPath] = txtPath.Text; + settings[Constants.HandheldcleanupPath] = txtHandheldcleanupPath.Text; settings[Constants.EnterpriseServer] = txtEnterpriseServer.Text; settings[Constants.EnterpriseServerFQDN] = txtEnterpriseServerFQDN.Text; settings[Constants.Password] = (txtPassword.Text.Length > 0) ? txtPassword.Text : (string)ViewState["PWD"]; settings[Constants.UserName] = txtUser.Text; + settings[Constants.MAPIProfile] = txtMAPIProfile.Text; } } } \ No newline at end of file diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs index a17ad239..fcdef004 100644 --- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs +++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/BlackBerry5_Settings.ascx.designer.cs @@ -40,13 +40,40 @@ namespace WebsitePanel.Portal.ProviderControls { protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1; /// - /// Label1 control. + /// lblHandheldcleanupPath control. /// /// /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.Label lblHandheldcleanupPath; + + /// + /// txtHandheldcleanupPath control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtHandheldcleanupPath; + + /// + /// RequiredFieldValidator7 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator7; + + /// + /// lblUser control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblUser; /// /// txtUser control. @@ -146,5 +173,32 @@ namespace WebsitePanel.Portal.ProviderControls { /// To modify move field declaration from designer file to code-behind file. /// protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator5; + + /// + /// lblMAPIProfile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label lblMAPIProfile; + + /// + /// txtMAPIProfile control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtMAPIProfile; + + /// + /// RequiredFieldValidator6 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator6; } }