diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index 2b3165f1..53e1527e 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1994,7 +1994,8 @@ namespace WebsitePanel.EnterpriseServer
AccountLockoutDuration = GetValueSafe(parts, 9, 0),
ResetAccountLockoutCounterAfter = GetValueSafe(parts, 10, 0),
LockoutSettingsEnabled = GetValueSafe(parts, 11, false),
- PasswordComplexityEnabled = GetValueSafe(parts, 11, true),
+ PasswordComplexityEnabled = GetValueSafe(parts, 12, true),
+ MaxPasswordAge = GetValueSafe(parts, 13, 42),
};
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPasswordSettings.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPasswordSettings.cs
index cc00f552..1fc0ab6f 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPasswordSettings.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationPasswordSettings.cs
@@ -5,6 +5,7 @@
public int MinimumLength { get; set; }
public int MaximumLength { get; set; }
public int EnforcePasswordHistory { get; set; }
+ public int MaxPasswordAge { get; set; }
public bool LockoutSettingsEnabled { get; set; }
public int AccountLockoutDuration { get; set; }
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
index 86245c86..7aae57fa 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
@@ -740,7 +740,8 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("MinPasswordLength", settings.MinimumLength);
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
cmd.Parameters.Add("ComplexityEnabled", false);
- cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
+ cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
+ cmd.Parameters.Add("MaxPasswordAge", new TimeSpan(settings.MaxPasswordAge * 24, 0, 0));
if (settings.LockoutSettingsEnabled)
{
@@ -777,6 +778,7 @@ namespace WebsitePanel.Providers.HostedSolution
cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
cmd.Parameters.Add("ComplexityEnabled", false);
cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
+ cmd.Parameters.Add("MaxPasswordAge", new TimeSpan(settings.MaxPasswordAge*24, 0, 0));
if (settings.LockoutSettingsEnabled)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
index d26285c0..022aa747 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
@@ -48,6 +48,12 @@ namespace WebsitePanel.WebDavPortal
defaults: new { controller = "Account", action = "PasswordResetFinalStep", pincode = UrlParameter.Optional }
);
+ routes.MapRoute(
+ name: AccountRouteNames.PasswordResetSuccess,
+ url: "account/password-reset/success",
+ defaults: new { controller = "Account", action = "PasswordSuccessfullyChanged" }
+ );
+
routes.MapRoute(
name: AccountRouteNames.PasswordChange,
url: "account/profile/password-change",
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
index cd3da37d..6d28ac8e 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
@@ -16,6 +16,7 @@ namespace WebsitePanel.WebDavPortal.UI.Routes
public const string PasswordResetSms = "PasswordResetSmsRoute";
public const string PasswordResetSendSms = "PasswordResetSendSmsRoute";
public const string PasswordResetFinalStep = "PasswordResetFinalStepRoute";
+ public const string PasswordResetSuccess = "PasswordResetSuccess";
public const string PhoneNumberIsAvailible = "PhoneNumberIsAvailibleRoute";
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
index 776aef2e..b63a7e2d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
@@ -299,7 +299,14 @@ namespace WebsitePanel.WebDavPortal.Controllers
AddMessage(MessageType.Success, Resources.Messages.PasswordSuccessfullyChanged);
- return RedirectToRoute(AccountRouteNames.Login);
+ return RedirectToRoute(AccountRouteNames.PasswordResetSuccess);
+ }
+
+ [HttpGet]
+ [AllowAnonymous]
+ public ActionResult PasswordSuccessfullyChanged()
+ {
+ return View();
}
[HttpGet]
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
index deaab032..4fc8c9ae 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
@@ -60,6 +60,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Account.
+ ///
+ public static string Account {
+ get {
+ return ResourceManager.GetString("Account", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Actions.
///
@@ -123,6 +132,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to You can now access your {0}..
+ ///
+ public static string CanAccessYourFormat {
+ get {
+ return ResourceManager.GetString("CanAccessYourFormat", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Cancel.
///
@@ -537,6 +555,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Your new password has been set..
+ ///
+ public static string NewPasswordBeenSet {
+ get {
+ return ResourceManager.GetString("NewPasswordBeenSet", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Confirm password.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
index 232393d4..508f4a2d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
@@ -396,4 +396,13 @@
Password never expires. If you want to change password then please click {0}.
+
+ Account
+
+
+ You can now access your {0}.
+
+
+ Your new password has been set.
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordSuccessfullyChanged.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordSuccessfullyChanged.cshtml
new file mode 100644
index 00000000..4051a02f
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordSuccessfullyChanged.cshtml
@@ -0,0 +1,18 @@
+@using WebsitePanel.WebDavPortal.Resources
+@using WebsitePanel.WebDavPortal.UI.Routes
+
+@{
+ string message = string.Format(UI.CanAccessYourFormat, Html.RouteLink(UI.Account,AccountRouteNames.Login));
+}
+
+
+
+
+
@Messages.PasswordSuccessfullyChanged
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
index 5125297a..62be767a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
@@ -489,6 +489,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSettingsPasswordSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSettingsPasswordSettings.ascx.resx
index a513b285..e76f5f06 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSettingsPasswordSettings.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationSettingsPasswordSettings.ascx.resx
@@ -219,4 +219,13 @@
*
+
+ Max Password Age (days):
+
+
+ *
+
+
+ *
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx
index b9cc4ccb..f674f3d8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx
@@ -7,35 +7,35 @@
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- |
+
+ |
|
- |
+
+ |
- |
+
- |
+
+ |
|
+
+
+ |
+
+
+
+ |
+
-
+
|
- |
+
+ |
|
-
+ |
+
|
-
+ |
+
-
+
|
|
@@ -116,31 +132,34 @@
-
+ |
+
- |
+
|
-
+ |
+
- |
+
|
-
+ |
+
-
+
|
|
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.cs
index 48ceea57..de5799fe 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
@@ -59,6 +60,8 @@ namespace WebsitePanel.Portal.ExchangeServer
txtResetAccountLockout.Text = PasswordPolicyEditor.GetValueSafe(parts, 10, "0");
chkLockOutSettigns.Checked = PasswordPolicyEditor.GetValueSafe(parts, 11, false);
chkPasswordComplexity.Checked = PasswordPolicyEditor.GetValueSafe(parts, 12, true);
+
+ txtMaxPasswordAge.Text = PasswordPolicyEditor.GetValueSafe(parts, 13, "42");
}
private void BindSettings(OrganizationPasswordSettings settings)
@@ -75,6 +78,8 @@ namespace WebsitePanel.Portal.ExchangeServer
txtResetAccountLockout.Text = settings.ResetAccountLockoutCounterAfter.ToString();
chkLockOutSettigns.Checked = settings.LockoutSettingsEnabled;
chkPasswordComplexity.Checked = settings.PasswordComplexityEnabled;
+
+ txtMaxPasswordAge.Text = settings.MaxPasswordAge.ToString();
}
private OrganizationPasswordSettings GetSettings()
@@ -94,6 +99,8 @@ namespace WebsitePanel.Portal.ExchangeServer
settings.LockoutSettingsEnabled = chkLockOutSettigns.Checked;
settings.PasswordComplexityEnabled =chkPasswordComplexity.Checked;
+ settings.MaxPasswordAge = Utils.ParseInt(txtMaxPasswordAge.Text, 42);
+
return settings;
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
index 0b6398ac..67d8ca05 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
@@ -210,6 +210,42 @@ namespace WebsitePanel.Portal.ExchangeServer {
///
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
+ ///
+ /// lblMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMaxPasswordAge;
+
+ ///
+ /// txtMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtMaxPasswordAge;
+
+ ///
+ /// valRequireMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireMaxPasswordAge;
+
+ ///
+ /// valCorrectMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectMaxPasswordAge;
+
///
/// RowChkLockOutSettigns control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PasswordPolicyEditor.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PasswordPolicyEditor.ascx.resx
index ea3bf9da..8a6a32e8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PasswordPolicyEditor.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/App_LocalResources/PasswordPolicyEditor.ascx.resx
@@ -210,4 +210,13 @@
*
+
+ Max Password Age (days):
+
+
+ *
+
+
+ *
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx
index 0180aba1..3f2d00f4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx
@@ -37,6 +37,16 @@
+
+ |
+
+
+
+ |
+
(string[] array, int index, T defaultValue)
{
- if (array.Length > index)
+ try
{
- if (string.IsNullOrEmpty(array[index]))
+ if (array.Length > index)
{
- return defaultValue;
- }
+ if (string.IsNullOrEmpty(array[index]))
+ {
+ return defaultValue;
+ }
- return (T)Convert.ChangeType(array[index], typeof(T));
+ return (T)Convert.ChangeType(array[index], typeof(T));
+ }
}
+ catch{}
return defaultValue;
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx.designer.cs
index 557e0e74..ee474023 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserControls/PasswordPolicyEditor.ascx.designer.cs
@@ -147,6 +147,42 @@ namespace WebsitePanel.Portal {
///
protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectEnforcePasswordHistory;
+ ///
+ /// lblMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblMaxPasswordAge;
+
+ ///
+ /// txtMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtMaxPasswordAge;
+
+ ///
+ /// valRequireMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireMaxPasswordAge;
+
+ ///
+ /// valCorrectMaxPasswordAge control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RegularExpressionValidator valCorrectMaxPasswordAge;
+
///
/// RowChkLockOutSettigns control.
///
|