This commit is contained in:
Alexander Trofimov 2015-05-03 22:23:56 +03:00
commit 6e8cf2baa6
50 changed files with 1485 additions and 279 deletions

View file

@ -10053,6 +10053,114 @@ ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetLinkSmsBody'
GO
-- USER PASSWORD RESET EMAIL PINCODE TEMPLATE
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'From' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'From', N'support@HostingCompany.com')
END
GO
DECLARE @UserPasswordResetPincodeLetterHtmlBody nvarchar(2500)
Set @UserPasswordResetPincodeLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Password reset notification</title>
<style type="text/css">
.Summary { background-color: ##ffffff; padding: 5px; }
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
.Summary A { color: ##0153A4; }
.Summary { font-family: Tahoma; font-size: 9pt; }
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
.Summary H2 { font-size: 1.3em; color: ##1F4978; }
.Summary TABLE { border: solid 1px ##e5e5e5; }
.Summary TH,
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
.Summary TD { padding: 8px; font-size: 9pt; }
.Summary UL LI { font-size: 1.1em; font-weight: bold; }
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
</style>
</head>
<body>
<div class="Summary">
<div class="Header">
<img src="#logoUrl#">
</div>
<h1>Password reset notification</h1>
<ad:if test="#user#">
<p>
Hello #user.FirstName#,
</p>
</ad:if>
<p>
We received a request to reset the password for your account. Your password reset pincode:
</p>
#passwordResetPincode#
<p>
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
</p>
<p>
Best regards
</p>
</div>
</body>';
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'HtmlBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'HtmlBody', @UserPasswordResetPincodeLetterHtmlBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'HtmlBody'
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'Priority' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'Priority', N'Normal')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'Subject' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'Subject', N'Password reset notification')
END
GO
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'LogoUrl' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
END
GO
DECLARE @UserPasswordResetPincodeLetterTextBody nvarchar(2500)
Set @UserPasswordResetPincodeLetterTextBody = N'=========================================
Password reset notification
=========================================
<ad:if test="#user#">
Hello #user.FirstName#,
</ad:if>
We received a request to reset the password for your account. Your password reset pincode:
#passwordResetPincode#
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
Best regards'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'TextBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'TextBody', @UserPasswordResetPincodeLetterTextBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetPincodeLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'TextBody'
GO
DECLARE @UserPasswordPincodeSMSBody nvarchar(2500)
@ -10060,12 +10168,12 @@ Set @UserPasswordPincodeSMSBody = N'
Your password reset pincode:
#passwordResetPincode#'
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody' )
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody' )
BEGIN
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'PasswordResetPincodeSmsBody', @UserPasswordPincodeSMSBody)
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetPincodeLetter', N'PasswordResetPincodeSmsBody', @UserPasswordPincodeSMSBody)
END
ELSE
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordPincodeSMSBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetPincodeLetter' AND [PropertyName]= N'PasswordResetPincodeSmsBody'
GO
-- Exchange setup EMAIL TEMPLATE

View file

@ -56,6 +56,7 @@ namespace WebsitePanel.EnterpriseServer
public const string TWILIO_PHONEFROM_KEY = "TwilioPhoneFrom";
public const string WEBDAV_PASSWORD_RESET_ENABLED_KEY = "WebdavPswResetEnabled";
public const string WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN = "WebdavPswdResetLinkLifeSpan";
// key to access to wpi main & custom feed in wpi settings
public const string WPI_MAIN_FEED_KEY = "WpiMainFeedUrl";

View file

@ -67,6 +67,7 @@ namespace WebsitePanel.EnterpriseServer
public const string RDS_POLICY = "RdsPolicy";
public const string USER_PASSWORD_EXPIRATION_LETTER = "UserPasswordExpirationLetter";
public const string USER_PASSWORD_RESET_LETTER = "UserPasswordResetLetter";
public const string USER_PASSWORD_RESET_PINCODE_LETTER = "UserPasswordResetPincodeLetter";
public const string HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy";

View file

@ -12,6 +12,7 @@
// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//
using WebsitePanel.EnterpriseServer.Base.HostedSolution;
using WebsitePanel.Providers;
using WebsitePanel.Providers.Common;
@ -36,6 +37,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol {
private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback CheckPhoneNumberIsInUseOperationCompleted;
private System.Threading.SendOrPostCallback DeletePasswordresetAccessTokenOperationCompleted;
@ -86,6 +91,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeSmsOperationCompleted;
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeEmailOperationCompleted;
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
@ -128,6 +135,8 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback SendResetUserPasswordEmailOperationCompleted;
private System.Threading.SendOrPostCallback CreatePasswordResetAccessTokenOperationCompleted;
private System.Threading.SendOrPostCallback CreateSecurityGroupOperationCompleted;
private System.Threading.SendOrPostCallback GetSecurityGroupGeneralSettingsOperationCompleted;
@ -160,15 +169,17 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted;
private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted;
/// <remarks/>
public esOrganizations() {
this.Url = "http://localhost:9002/esOrganizations.asmx";
}
/// <remarks/>
public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted;
/// <remarks/>
public event GetSupportServiceLevelCompletedEventHandler GetSupportServiceLevelCompleted;
/// <remarks/>
public event CheckPhoneNumberIsInUseCompletedEventHandler CheckPhoneNumberIsInUseCompleted;
@ -244,6 +255,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/>
public event SendResetUserPasswordPincodeSmsCompletedEventHandler SendResetUserPasswordPincodeSmsCompleted;
/// <remarks/>
public event SendResetUserPasswordPincodeEmailCompletedEventHandler SendResetUserPasswordPincodeEmailCompleted;
/// <remarks/>
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
@ -307,6 +321,9 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
/// <remarks/>
public event SendResetUserPasswordEmailCompletedEventHandler SendResetUserPasswordEmailCompleted;
/// <remarks/>
public event CreatePasswordResetAccessTokenCompletedEventHandler CreatePasswordResetAccessTokenCompleted;
/// <remarks/>
public event CreateSecurityGroupCompletedEventHandler CreateSecurityGroupCompleted;
@ -356,10 +373,89 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
/// <remarks/>
public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted;
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddSupportServiceLevel(string levelName, string levelDescription) {
object[] results = this.Invoke("AddSupportServiceLevel", new object[] {
levelName,
levelDescription});
return ((int)(results[0]));
}
/// <remarks/>
public event GetSupportServiceLevelCompletedEventHandler GetSupportServiceLevelCompleted;
public System.IAsyncResult BeginAddSupportServiceLevel(string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddSupportServiceLevel", new object[] {
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public int EndAddSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void AddSupportServiceLevelAsync(string levelName, string levelDescription) {
this.AddSupportServiceLevelAsync(levelName, levelDescription, null);
}
/// <remarks/>
public void AddSupportServiceLevelAsync(string levelName, string levelDescription, object userState) {
if ((this.AddSupportServiceLevelOperationCompleted == null)) {
this.AddSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("AddSupportServiceLevel", new object[] {
levelName,
levelDescription}, this.AddSupportServiceLevelOperationCompleted, userState);
}
private void OnAddSupportServiceLevelOperationCompleted(object arg) {
if ((this.AddSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddSupportServiceLevelCompleted(this, new AddSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ServiceLevel GetSupportServiceLevel(int levelID) {
object[] results = this.Invoke("GetSupportServiceLevel", new object[] {
levelID});
return ((ServiceLevel)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetSupportServiceLevel(int levelID, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSupportServiceLevel", new object[] {
levelID}, callback, asyncState);
}
/// <remarks/>
public ServiceLevel EndGetSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ServiceLevel)(results[0]));
}
/// <remarks/>
public void GetSupportServiceLevelAsync(int levelID) {
this.GetSupportServiceLevelAsync(levelID, null);
}
/// <remarks/>
public void GetSupportServiceLevelAsync(int levelID, object userState) {
if ((this.GetSupportServiceLevelOperationCompleted == null)) {
this.GetSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("GetSupportServiceLevel", new object[] {
levelID}, this.GetSupportServiceLevelOperationCompleted, userState);
}
private void OnGetSupportServiceLevelOperationCompleted(object arg) {
if ((this.GetSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetSupportServiceLevelCompleted(this, new GetSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckPhoneNumberIsInUse", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
@ -1463,6 +1559,50 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendResetUserPasswordPincodeEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ResultObject SendResetUserPasswordPincodeEmail(System.Guid token, string mailTo) {
object[] results = this.Invoke("SendResetUserPasswordPincodeEmail", new object[] {
token,
mailTo});
return ((ResultObject)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginSendResetUserPasswordPincodeEmail(System.Guid token, string mailTo, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SendResetUserPasswordPincodeEmail", new object[] {
token,
mailTo}, callback, asyncState);
}
/// <remarks/>
public ResultObject EndSendResetUserPasswordPincodeEmail(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ResultObject)(results[0]));
}
/// <remarks/>
public void SendResetUserPasswordPincodeEmailAsync(System.Guid token, string mailTo) {
this.SendResetUserPasswordPincodeEmailAsync(token, mailTo, null);
}
/// <remarks/>
public void SendResetUserPasswordPincodeEmailAsync(System.Guid token, string mailTo, object userState) {
if ((this.SendResetUserPasswordPincodeEmailOperationCompleted == null)) {
this.SendResetUserPasswordPincodeEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendResetUserPasswordPincodeEmailOperationCompleted);
}
this.InvokeAsync("SendResetUserPasswordPincodeEmail", new object[] {
token,
mailTo}, this.SendResetUserPasswordPincodeEmailOperationCompleted, userState);
}
private void OnSendResetUserPasswordPincodeEmailOperationCompleted(object arg) {
if ((this.SendResetUserPasswordPincodeEmailCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SendResetUserPasswordPincodeEmailCompleted(this, new SendResetUserPasswordPincodeEmailCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddOrganizationDomain(int itemId, string domainName) {
@ -2697,6 +2837,50 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreatePasswordResetAccessToken", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public AccessToken CreatePasswordResetAccessToken(int itemId, int accountId) {
object[] results = this.Invoke("CreatePasswordResetAccessToken", new object[] {
itemId,
accountId});
return ((AccessToken)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginCreatePasswordResetAccessToken(int itemId, int accountId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreatePasswordResetAccessToken", new object[] {
itemId,
accountId}, callback, asyncState);
}
/// <remarks/>
public AccessToken EndCreatePasswordResetAccessToken(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((AccessToken)(results[0]));
}
/// <remarks/>
public void CreatePasswordResetAccessTokenAsync(int itemId, int accountId) {
this.CreatePasswordResetAccessTokenAsync(itemId, accountId, null);
}
/// <remarks/>
public void CreatePasswordResetAccessTokenAsync(int itemId, int accountId, object userState) {
if ((this.CreatePasswordResetAccessTokenOperationCompleted == null)) {
this.CreatePasswordResetAccessTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreatePasswordResetAccessTokenOperationCompleted);
}
this.InvokeAsync("CreatePasswordResetAccessToken", new object[] {
itemId,
accountId}, this.CreatePasswordResetAccessTokenOperationCompleted, userState);
}
private void OnCreatePasswordResetAccessTokenOperationCompleted(object arg) {
if ((this.CreatePasswordResetAccessTokenCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreatePasswordResetAccessTokenCompleted(this, new CreatePasswordResetAccessTokenCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int CreateSecurityGroup(int itemId, string displayName) {
@ -3419,97 +3603,64 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public int AddSupportServiceLevel(string levelName, string levelDescription) {
object[] results = this.Invoke("AddSupportServiceLevel", new object[] {
levelName,
levelDescription});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginAddSupportServiceLevel(string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddSupportServiceLevel", new object[] {
levelName,
levelDescription}, callback, asyncState);
}
/// <remarks/>
public int EndAddSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
/// <remarks/>
public void AddSupportServiceLevelAsync(string levelName, string levelDescription) {
this.AddSupportServiceLevelAsync(levelName, levelDescription, null);
}
/// <remarks/>
public void AddSupportServiceLevelAsync(string levelName, string levelDescription, object userState) {
if ((this.AddSupportServiceLevelOperationCompleted == null)) {
this.AddSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("AddSupportServiceLevel", new object[] {
levelName,
levelDescription}, this.AddSupportServiceLevelOperationCompleted, userState);
}
private void OnAddSupportServiceLevelOperationCompleted(object arg) {
if ((this.AddSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddSupportServiceLevelCompleted(this, new AddSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public ServiceLevel GetSupportServiceLevel(int levelID) {
object[] results = this.Invoke("GetSupportServiceLevel", new object[] {
levelID});
return ((ServiceLevel)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetSupportServiceLevel(int levelID, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSupportServiceLevel", new object[] {
levelID}, callback, asyncState);
}
/// <remarks/>
public ServiceLevel EndGetSupportServiceLevel(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((ServiceLevel)(results[0]));
}
/// <remarks/>
public void GetSupportServiceLevelAsync(int levelID) {
this.GetSupportServiceLevelAsync(levelID, null);
}
/// <remarks/>
public void GetSupportServiceLevelAsync(int levelID, object userState) {
if ((this.GetSupportServiceLevelOperationCompleted == null)) {
this.GetSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSupportServiceLevelOperationCompleted);
}
this.InvokeAsync("GetSupportServiceLevel", new object[] {
levelID}, this.GetSupportServiceLevelOperationCompleted, userState);
}
private void OnGetSupportServiceLevelOperationCompleted(object arg) {
if ((this.GetSupportServiceLevelCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetSupportServiceLevelCompleted(this, new GetSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
/// <remarks/>
public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal AddSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSupportServiceLevelCompletedEventHandler(object sender, GetSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ServiceLevel Result {
get {
this.RaiseExceptionIfNecessary();
return ((ServiceLevel)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CheckPhoneNumberIsInUseCompletedEventHandler(object sender, CheckPhoneNumberIsInUseCompletedEventArgs e);
@ -4050,6 +4201,32 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendResetUserPasswordPincodeEmailCompletedEventHandler(object sender, SendResetUserPasswordPincodeEmailCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class SendResetUserPasswordPincodeEmailCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal SendResetUserPasswordPincodeEmailCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ResultObject Result {
get {
this.RaiseExceptionIfNecessary();
return ((ResultObject)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
@ -4574,6 +4751,32 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SendResetUserPasswordEmailCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreatePasswordResetAccessTokenCompletedEventHandler(object sender, CreatePasswordResetAccessTokenCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class CreatePasswordResetAccessTokenCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal CreatePasswordResetAccessTokenCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public AccessToken Result {
get {
this.RaiseExceptionIfNecessary();
return ((AccessToken)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateSecurityGroupCompletedEventHandler(object sender, CreateSecurityGroupCompletedEventArgs e);
@ -4923,56 +5126,4 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class AddSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal AddSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public int Result {
get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSupportServiceLevelCompletedEventHandler(object sender, GetSupportServiceLevelCompletedEventArgs e);
/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
public partial class GetSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
private object[] results;
internal GetSupportServiceLevelCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
base(exception, cancelled, userState) {
this.results = results;
}
/// <remarks/>
public ServiceLevel Result {
get {
this.RaiseExceptionIfNecessary();
return ((ServiceLevel)(this.results[0]));
}
}
}
}

View file

@ -1654,15 +1654,14 @@ namespace WebsitePanel.EnterpriseServer
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(accessToken.ItemId,
accessToken.AccountId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(accessToken.ItemId, accessToken.AccountId);
if (string.IsNullOrEmpty(phoneTo))
{
phoneTo = user.MobilePhone;
}
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_RESET_LETTER);
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_RESET_PINCODE_LETTER);
string body = settings["PasswordResetPincodeSmsBody"];
@ -1700,6 +1699,90 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
public static ResultObject SendResetUserPasswordPincodeEmail(Guid token, string mailTo = null)
{
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_EMAIL_PINCODE");
try
{
var accessToken = OrganizationController.GetAccessToken(token, AccessTokenTypes.PasswrodReset);
if (accessToken == null)
{
throw new Exception(string.Format("Access token not found"));
}
// load organization
Organization org = GetOrganization(accessToken.ItemId);
if (org == null)
{
throw new Exception(string.Format("Organization not found"));
}
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(accessToken.ItemId, accessToken.AccountId);
if (string.IsNullOrEmpty(mailTo))
{
mailTo = user.PrimaryEmailAddress;
}
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_RESET_PINCODE_LETTER);
var generalSettings = OrganizationController.GetOrganizationGeneralSettings(accessToken.ItemId);
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
if (string.IsNullOrEmpty(logoUrl))
{
logoUrl = settings["LogoUrl"];
}
string from = settings["From"];
string subject = settings["Subject"];
string body = owner.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
bool isHtml = owner.HtmlMail;
MailPriority priority = MailPriority.Normal;
if (!String.IsNullOrEmpty(settings["Priority"]))
{
priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
}
string pincode = GeneratePincode() ;
Hashtable items = new Hashtable();
items["user"] = user;
items["logoUrl"] = logoUrl;
items["passwordResetPincode"] = pincode;
body = PackageController.EvaluateTemplate(body, items);
SetAccessTokenResponse(token, pincode);
TaskManager.Write("Organization ID : " + user.ItemId);
TaskManager.Write("Account : " + user.DisplayName);
TaskManager.Write("MailTo : " + mailTo);
// send mail message
MailHelper.SendMessage(from, mailTo, null, subject, body, priority, isHtml);
}
catch (Exception ex)
{
TaskManager.WriteError(ex);
TaskManager.CompleteResultTask(result);
result.AddError("", ex);
return result;
}
TaskManager.CompleteResultTask();
return result;
}
private static string GeneratePincode()
{
var random = new Random(Guid.NewGuid().GetHashCode());
@ -1877,7 +1960,9 @@ namespace WebsitePanel.EnterpriseServer
var webdavPortalUrl = new Uri(settings["WebdavPortalUrl"]);
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset);
var hours = settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN, 1);
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset, hours);
tokenGuid = token.AccessTokenGuid;
@ -1892,7 +1977,21 @@ namespace WebsitePanel.EnterpriseServer
return resultUrl.ToString();
}
private static AccessToken CreateAccessToken(int itemId, int accountId, AccessTokenTypes type)
public static AccessToken CreatePasswordResetAccessToken(int itemId, int accountId)
{
var settings = GetWebDavSystemSettings();
if (settings == null || !settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false))
{
return null;
}
var hours = settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN, 1);
return CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset, hours);
}
private static AccessToken CreateAccessToken(int itemId, int accountId, AccessTokenTypes type, int hours)
{
var token = new AccessToken
{
@ -1900,7 +1999,7 @@ namespace WebsitePanel.EnterpriseServer
ItemId = itemId,
AccountId = accountId,
TokenType = type,
ExpirationDate = DateTime.Now.AddHours(12)
ExpirationDate = DateTime.Now.AddHours(hours)
};
token.Id = DataProvider.AddAccessToken(token);
@ -2890,6 +2989,7 @@ namespace WebsitePanel.EnterpriseServer
OrganizationUser retUser = orgProxy.GetOrganizationUserWithExtraData(accountName, org.OrganizationId);
retUser.AccountId = accountId;
retUser.ItemId = itemId;
retUser.AccountName = account.AccountName;
retUser.PrimaryEmailAddress = account.PrimaryEmailAddress;
retUser.AccountType = account.AccountType;

View file

@ -204,6 +204,12 @@ namespace WebsitePanel.EnterpriseServer
return OrganizationController.SendResetUserPasswordPincodeSms(token, phoneTo);
}
[WebMethod]
public ResultObject SendResetUserPasswordPincodeEmail(Guid token, string mailTo = null)
{
return OrganizationController.SendResetUserPasswordPincodeEmail(token, mailTo);
}
#endregion
@ -361,6 +367,12 @@ namespace WebsitePanel.EnterpriseServer
OrganizationController.SendResetUserPasswordEmail(itemId, accountId, reason, mailTo, finalStep);
}
[WebMethod]
public AccessToken CreatePasswordResetAccessToken(int itemId, int accountId)
{
return OrganizationController.CreatePasswordResetAccessToken(itemId, accountId);
}
#endregion
#region Security Groups

View file

@ -576,6 +576,11 @@ namespace WebsitePanel.Providers.HostedSolution
if (span != null)
{
if (span.Value.Duration() == new TimeSpan().Duration())
{
return TimeSpan.MaxValue;
}
return span.Value;
}
}
@ -679,15 +684,20 @@ namespace WebsitePanel.Providers.HostedSolution
if (!FineGrainedPasswordPolicyExist(runspace, psoName))
{
CreateFineGrainedPasswordPolicy(runspace, organizationId, psoName, settings);
string groupPath = GetGroupPath(organizationId);
SetFineGrainedPasswordPolicySubject(runspace, groupPath, psoName);
}
else
{
UpdateFineGrainedPasswordPolicy(runspace, psoName, settings);
}
string groupPath = GetGroupPath(organizationId);
SetFineGrainedPasswordPolicySubject(runspace, groupPath, psoName);
if (settings.MaxPasswordAge == 0)
{
SetPasswordNeverExpiresInFineGrainedPasswordPolicy(runspace, psoName);
}
}
catch (Exception ex)
{
@ -706,6 +716,24 @@ namespace WebsitePanel.Providers.HostedSolution
return string.Format("{0}-PSO", organizationId);
}
private void SetPasswordNeverExpiresInFineGrainedPasswordPolicy(Runspace runspace, string psoName)
{
var psoObject = GetFineGrainedPasswordPolicy(runspace, psoName);
var distinguishedName = GetPSObjectProperty(psoObject, "DistinguishedName") as string;
var cmd = new Command("Set-ADObject");
cmd.Parameters.Add("Identity", distinguishedName);
var hashTable = new Hashtable();
hashTable.Add("msDS-MaximumPasswordAge", "-9223372036854775808");
cmd.Parameters.Add("Replace", hashTable);
ExecuteShellCommand(runspace, cmd);
}
private bool FineGrainedPasswordPolicyExist(Runspace runspace, string psoName)
{
try
@ -759,12 +787,12 @@ namespace WebsitePanel.Providers.HostedSolution
var cmd = new Command("Add-ADFineGrainedPasswordPolicySubject");
cmd.Parameters.Add("Identity", psoName);
cmd.Parameters.Add("Subjects", entry.Properties[ADAttributes.SAMAccountName].Value.ToString());
cmd.Parameters.Add("Subjects", entry.Properties[ADAttributes.DistinguishedName].Value.ToString());
ExecuteShellCommand(runspace, cmd);
cmd = new Command("Set-ADGroup");
cmd.Parameters.Add("Identity", entry.Properties[ADAttributes.SAMAccountName].Value.ToString());
cmd.Parameters.Add("Identity", entry.Properties[ADAttributes.DistinguishedName].Value.ToString());
cmd.Parameters.Add("GroupScope", "Global");
ExecuteShellCommand(runspace, cmd);

View file

@ -75,6 +75,16 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
}
}
public string AccountIdKey
{
get
{
SessionKeysElement sessionKey =
_sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.AccountIdKey);
return sessionKey != null ? sessionKey.Value : null;
}
}
public string ResourseRenderCount
{
get

View file

@ -16,6 +16,7 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
public const string ItemIdSessionKey = "ItemId";
public const string OwaEditFoldersSessionKey = "OwaEditFoldersSession";
public const string AccountIdKey = "AccountIdKey";
[ConfigurationProperty(KeyKey, IsKey = true, IsRequired = true)]
public string Key

View file

@ -8,5 +8,15 @@
string result = source.Remove(index, target.Length).Insert(index, newValue);
return result;
}
public static string Tail(this string source, int tailLength)
{
if (source == null || tailLength >= source.Length)
{
return source;
}
return source.Substring(source.Length - tailLength);
}
}
}

View file

@ -25,21 +25,21 @@ namespace WebsitePanel.WebDavPortal
);
routes.MapRoute(
name: AccountRouteNames.PasswordResetEmail,
name: AccountRouteNames.PasswordResetLogin,
url: "account/password-reset/step-1",
defaults: new { controller = "Account", action = "PasswordResetEmail" }
defaults: new { controller = "Account", action = "PasswordResetLogin" }
);
routes.MapRoute(
name: AccountRouteNames.PasswordResetSms,
name: AccountRouteNames.PasswordResetPincodeSendOptions,
url: "account/password-reset/step-2/{token}",
defaults: new { controller = "Account", action = "PasswordResetSms" }
defaults: new { controller = "Account", action = "PasswordResetPincodeSendOptions" }
);
routes.MapRoute(
name: AccountRouteNames.PasswordResetSendSms,
url: "account/password-reset/send-new-sms/{token}",
defaults: new { controller = "Account", action = "PasswordResetSendSms" }
name: AccountRouteNames.PasswordResetPincode,
url: "account/password-reset/step-3/{token}",
defaults: new { controller = "Account", action = "PasswordResetPincode" }
);
routes.MapRoute(

View file

@ -12,9 +12,9 @@ namespace WebsitePanel.WebDavPortal.UI.Routes
public const string UserProfile = "UserProfileRoute";
public const string PasswordChange = "PasswordChangeRoute";
public const string PasswordResetEmail = "PasswordResetEmailRoute";
public const string PasswordResetSms = "PasswordResetSmsRoute";
public const string PasswordResetSendSms = "PasswordResetSendSmsRoute";
public const string PasswordResetLogin = "PasswordResetLoginRoute";
public const string PasswordResetPincodeSendOptions = "PasswordResetPincodeSendOptionsRoute";
public const string PasswordResetPincode = "PasswordResetPincodeRoute";
public const string PasswordResetFinalStep = "PasswordResetFinalStepRoute";
public const string PasswordResetSuccess = "PasswordResetSuccess";

View file

@ -14,6 +14,7 @@ using WebsitePanel.WebDav.Core.Wsp.Framework;
using WebsitePanel.WebDavPortal.CustomAttributes;
using WebsitePanel.WebDavPortal.Models;
using WebsitePanel.WebDavPortal.Models.Account;
using WebsitePanel.WebDavPortal.Models.Account.Enums;
using WebsitePanel.WebDavPortal.Models.Common;
using WebsitePanel.WebDavPortal.Models.Common.EditorTemplates;
using WebsitePanel.WebDavPortal.Models.Common.Enums;
@ -162,16 +163,16 @@ namespace WebsitePanel.WebDavPortal.Controllers
[HttpGet]
[AllowAnonymous]
public ActionResult PasswordResetEmail()
public ActionResult PasswordResetLogin()
{
var model = new PasswordResetEmailModel();
var model = new PasswordResetLoginModel();
return View(model);
}
[HttpPost]
[AllowAnonymous]
public ActionResult PasswordResetEmail(PasswordResetEmailModel model)
public ActionResult PasswordResetLogin(PasswordResetLoginModel model)
{
if (!ModelState.IsValid)
{
@ -187,17 +188,117 @@ namespace WebsitePanel.WebDavPortal.Controllers
return View(model);
}
WspContext.Services.Organizations.SendResetUserPasswordEmail(exchangeAccount.ItemId, exchangeAccount.AccountId, Resources.Messages.PasswordResetUserReason, exchangeAccount.PrimaryEmailAddress, false);
var tokenEntity = WspContext.Services.Organizations.CreatePasswordResetAccessToken(exchangeAccount.ItemId, exchangeAccount.AccountId);
return View("PasswordResetEmailSent");
return RedirectToRoute(AccountRouteNames.PasswordResetPincodeSendOptions, new {token = tokenEntity.AccessTokenGuid.ToString("N")});
}
[HttpGet]
[AllowAnonymous]
public ActionResult PasswordResetSms(Guid token)
public ActionResult PasswordResetPincodeSendOptions(Guid token)
{
var model = new PasswordResetSmsModel();
var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
if (accessToken == null)
{
AddMessage(MessageType.Error, Resources.Messages.IncorrectPasswordResetUrl);
return RedirectToRoute(AccountRouteNames.PasswordResetLogin);
}
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId, accessToken.AccountId);
if (string.IsNullOrEmpty(user.MobilePhone))
{
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeEmail(accessToken.AccessTokenGuid, user.PrimaryEmailAddress);
if (result.IsSuccess)
{
AddMessage(MessageType.Success, Resources.Messages.PincodeEmailWasSent);
}
else
{
AddMessage(MessageType.Error, Resources.Messages.PincodeEmailWasNotSent);
}
return RedirectToRoute(AccountRouteNames.PasswordResetPincode);
}
var model = new PasswordResetPincodeSendOptionsModel();
model.MobileNumber = user.MobilePhone;
model.Email = user.PrimaryEmailAddress;
return View(model);
}
[HttpPost]
[AllowAnonymous]
public ActionResult PasswordResetPincodeSendOptions(Guid token, PasswordResetPincodeSendOptionsModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}
var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
if (accessToken == null)
{
AddMessage(MessageType.Error, Resources.Messages.IncorrectPasswordResetUrl);
return RedirectToRoute(AccountRouteNames.PasswordResetLogin);
}
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId, accessToken.AccountId);
switch (model.Method)
{
case PincodeSendMethod.Mobile:
{
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeSms(accessToken.AccessTokenGuid, user.MobilePhone);
if (result.IsSuccess)
{
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
}
else
{
AddMessage(MessageType.Error, Resources.Messages.SmsWasNotSent);
return RedirectToRoute(AccountRouteNames.PasswordResetPincodeSendOptions);
}
break;
}
case PincodeSendMethod.Email:
{
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeEmail(accessToken.AccessTokenGuid, user.PrimaryEmailAddress);
if (result.IsSuccess)
{
AddMessage(MessageType.Success, Resources.Messages.PincodeEmailWasSent);
}
else
{
AddMessage(MessageType.Error, Resources.Messages.PincodeEmailWasNotSent);
return RedirectToRoute(AccountRouteNames.PasswordResetPincodeSendOptions);
}
break;
}
}
return RedirectToRoute(AccountRouteNames.PasswordResetPincode);
}
[HttpGet]
[AllowAnonymous]
public ActionResult PasswordResetPincode(Guid token)
{
var model = new PasswordResetPincodeModel();
var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
@ -207,25 +308,13 @@ namespace WebsitePanel.WebDavPortal.Controllers
{
AddMessage(MessageType.Error, Resources.Messages.IncorrectPasswordResetUrl);
return View(model);
return RedirectToRoute(AccountRouteNames.PasswordResetLogin);
}
if (accessToken != null && accessToken.IsSmsSent == false)
{
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
accessToken.AccountId);
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeSms(token, user.MobilePhone);
if (result.IsSuccess)
{
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
}
else
{
AddMessage(MessageType.Error, Resources.Messages.SmsWasNotSent);
}
return RedirectToRoute(AccountRouteNames.PasswordResetPincodeSendOptions);
}
return View(model);
@ -233,7 +322,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
[HttpPost]
[AllowAnonymous]
public ActionResult PasswordResetSms(Guid token, PasswordResetSmsModel model)
public ActionResult PasswordResetPincode(Guid token, PasswordResetPincodeModel model)
{
if (!ModelState.IsValid)
{
@ -267,15 +356,21 @@ namespace WebsitePanel.WebDavPortal.Controllers
return result;
}
var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
var account = WspContext.Services.Organizations.GetUserGeneralSettings(tokenEntity.ItemId,
tokenEntity.AccountId);
var model = new PasswordEditor();
var model = new PasswordResetFinalStepModel();
model.PasswordEditor.Settings = WspContext.Services.Organizations.GetOrganizationPasswordSettings(tokenEntity.ItemId);
model.Login = account.UserPrincipalName;
return View(model);
}
[HttpPost]
[AllowAnonymous]
public ActionResult PasswordResetFinalStep(Guid token, string pincode, PasswordEditor model)
public ActionResult PasswordResetFinalStep(Guid token, string pincode, PasswordResetFinalStepModel model)
{
if (!ModelState.IsValid)
{
@ -293,12 +388,10 @@ namespace WebsitePanel.WebDavPortal.Controllers
WspContext.Services.Organizations.SetUserPassword(
tokenEntity.ItemId, tokenEntity.AccountId,
model.NewPassword);
model.PasswordEditor.NewPassword);
WspContext.Services.Organizations.DeletePasswordresetAccessToken(token);
AddMessage(MessageType.Success, Resources.Messages.PasswordSuccessfullyChanged);
return RedirectToRoute(AccountRouteNames.PasswordResetSuccess);
}
@ -309,35 +402,6 @@ namespace WebsitePanel.WebDavPortal.Controllers
return View();
}
[HttpGet]
[AllowAnonymous]
public ActionResult PasswordResetSendSms(Guid token)
{
var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
if (accessToken == null)
{
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
}
var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
accessToken.AccountId);
var result = WspContext.Services.Organizations.SendResetUserPasswordPincodeSms(accessToken.AccessTokenGuid,
user.MobilePhone);
if (result.IsSuccess)
{
AddMessage(MessageType.Success, Resources.Messages.SmsWasSent);
}
else
{
AddMessage(MessageType.Error, Resources.Messages.SmsWasNotSent);
}
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
}
#region Helpers
/// <summary>
@ -358,7 +422,7 @@ namespace WebsitePanel.WebDavPortal.Controllers
{
AddMessage(MessageType.Error, Resources.Messages.IncorrectSmsResponse);
return RedirectToRoute(AccountRouteNames.PasswordResetSms);
return RedirectToRoute(AccountRouteNames.PasswordResetPincode); //todo
}
var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);

View file

@ -0,0 +1,8 @@
namespace WebsitePanel.WebDavPortal.Models.Account.Enums
{
public enum PincodeSendMethod
{
Mobile,
Email
}
}

View file

@ -0,0 +1,15 @@
using WebsitePanel.WebDavPortal.Models.Common.EditorTemplates;
namespace WebsitePanel.WebDavPortal.Models.Account
{
public class PasswordResetFinalStepModel
{
public PasswordResetFinalStepModel()
{
PasswordEditor = new PasswordEditor();
}
public string Login { get; set; }
public PasswordEditor PasswordEditor { get; set; }
}
}

View file

@ -4,7 +4,7 @@ using WebsitePanel.WebDavPortal.Resources;
namespace WebsitePanel.WebDavPortal.Models.Account
{
public class PasswordResetEmailModel
public class PasswordResetLoginModel
{
[Required]
[Display(ResourceType = typeof(Resources.UI), Name = "Email")]

View file

@ -3,7 +3,7 @@ using WebsitePanel.WebDavPortal.Models.Common;
namespace WebsitePanel.WebDavPortal.Models.Account
{
public class PasswordResetSmsModel
public class PasswordResetPincodeModel
{
[Required]
public string Sms { get; set; }

View file

@ -0,0 +1,11 @@
using WebsitePanel.WebDavPortal.Models.Account.Enums;
namespace WebsitePanel.WebDavPortal.Models.Account
{
public class PasswordResetPincodeSendOptionsModel
{
public PincodeSendMethod Method { get; set; }
public string MobileNumber { get; set; }
public string Email { get; set; }
}
}

View file

@ -160,7 +160,7 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
/// <summary>
/// Looks up a localized string similar to Please enter the verification code we sent to your phone. If you didn&apos;t receive a code, you can {0}..
/// Looks up a localized string similar to Please enter the verification code we sent to you. If you didn&apos;t receive a code, you can {0}..
/// </summary>
public static string PasswordResetSmsHintFormat {
get {
@ -213,6 +213,24 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pincode was not sent to your email address..
/// </summary>
public static string PincodeEmailWasNotSent {
get {
return ResourceManager.GetString("PincodeEmailWasNotSent", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Pincode was sent to your email address..
/// </summary>
public static string PincodeEmailWasSent {
get {
return ResourceManager.GetString("PincodeEmailWasSent", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} field is required.
/// </summary>

View file

@ -151,7 +151,7 @@
<value>A message was sent to your email address. Please check your email for further instructions.</value>
</data>
<data name="PasswordResetSmsHintFormat" xml:space="preserve">
<value>Please enter the verification code we sent to your phone. If you didn't receive a code, you can {0}.</value>
<value>Please enter the verification code we sent to you. If you didn't receive a code, you can {0}.</value>
</data>
<data name="PasswordResetUserReason" xml:space="preserve">
<value>Webdav portal user request.</value>
@ -168,6 +168,12 @@
<data name="PhoneNumberInvalid" xml:space="preserve">
<value>Phone number is invalid</value>
</data>
<data name="PincodeEmailWasNotSent" xml:space="preserve">
<value>Pincode was not sent to your email address.</value>
</data>
<data name="PincodeEmailWasSent" xml:space="preserve">
<value>Pincode was sent to your email address.</value>
</data>
<data name="Required" xml:space="preserve">
<value>{0} field is required</value>
</data>

View file

@ -654,6 +654,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Password must meet the following requirements:.
/// </summary>
public static string PasswordFollowingRequirements {
get {
return ResourceManager.GetString("PasswordFollowingRequirements", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Password never expires. If you want to change password then please click {0}..
/// </summary>
@ -690,6 +699,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Pincode.
/// </summary>
public static string Pincode {
get {
return ResourceManager.GetString("Pincode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Please wait....
/// </summary>
@ -798,6 +816,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Send.
/// </summary>
public static string Send {
get {
return ResourceManager.GetString("Send", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Send email.
/// </summary>
@ -807,6 +834,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to When you click the send button below, a Password Reset PIN will be sent to your Cell Phone or Email Address..
/// </summary>
public static string SendPincodeTo {
get {
return ResourceManager.GetString("SendPincodeTo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Size.
/// </summary>
@ -915,6 +951,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to You are changing password for &apos;{0}&apos; account..
/// </summary>
public static string YouRChangingPswForFormat {
get {
return ResourceManager.GetString("YouRChangingPswForFormat", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Zip/Postal Code.
/// </summary>

View file

@ -405,4 +405,19 @@
<data name="NewPasswordBeenSet" xml:space="preserve">
<value>Your new password has been set.</value>
</data>
<data name="PasswordFollowingRequirements" xml:space="preserve">
<value>Password must meet the following requirements:</value>
</data>
<data name="YouRChangingPswForFormat" xml:space="preserve">
<value>You are changing password for '{0}' account.</value>
</data>
<data name="Pincode" xml:space="preserve">
<value>Pincode</value>
</data>
<data name="Send" xml:space="preserve">
<value>Send</value>
</data>
<data name="SendPincodeTo" xml:space="preserve">
<value>When you click the send button below, a Password Reset PIN will be sent to your Cell Phone or Email Address.</value>
</data>
</root>

View file

@ -36,7 +36,7 @@
<button type="submit" class="btn btn-default">Sign in</button>
@if (Model.PasswordResetEnabled)
{
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetEmail)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
<a href="@Url.RouteUrl(AccountRouteNames.PasswordResetLogin)" class="forgot-your-password-link">@UI.ForgotYourPassword</a>
}
</div>
</div>

View file

@ -1,9 +1,9 @@
@{
@using WebsitePanel.WebDavPortal.Resources
@using WebsitePanel.WebDavPortal.UI.Routes
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetFinalStepModel
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@using WebsitePanel.WebDavPortal.Resources
@using WebsitePanel.WebDavPortal.UI.Routes
@model WebsitePanel.WebDavPortal.Models.Common.EditorTemplates.PasswordEditor
<div class="container row">
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetFinalStep, FormMethod.Post, new { @class = "form-horizontal user-password-reset-final-step bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset" }))
@ -12,8 +12,14 @@
<div class="form-group">
<h3>@UI.PasswordReset</h3>
</div>
<div class="form-group">
<span>
@string.Format(UI.YouRChangingPswForFormat, Model.Login)
</span>
</div>
@Html.EditorFor(x=>x)
@Html.EditorFor(x => x.PasswordEditor)
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
@ -23,5 +29,64 @@
}
</div>
@if (Model.PasswordEditor.Settings != null)
{
<div class="form-group hidden" id="password-hint-popup">
<ul>
<li>
@string.Format(Messages.PasswordMinLengthFormat, Model.PasswordEditor.Settings.MinimumLength)
</li>
<li>
@string.Format(Messages.PasswordMaxLengthFormat, Model.PasswordEditor.Settings.MaximumLength)
</li>
@if (Model.PasswordEditor.Settings.PasswordComplexityEnabled)
{
if (Model.PasswordEditor.Settings.UppercaseLettersCount > 0)
{
<li>
@string.Format(Messages.PasswordUppercaseCountFormat, Model.PasswordEditor.Settings.UppercaseLettersCount)
</li>
}
if (Model.PasswordEditor.Settings.NumbersCount > 0)
{
<li>
@string.Format(Messages.PasswordNumbersCountFormat, Model.PasswordEditor.Settings.NumbersCount)
</li>
}
if (Model.PasswordEditor.Settings.SymbolsCount > 0)
{
<li>
@string.Format(Messages.PasswordSymbolsCountFormat, Model.PasswordEditor.Settings.SymbolsCount)
</li>
}
}
</ul>
</div>
}
@section scripts{
<script>
$(function() {
if ($(document).width() < 800) {
$('.password-input').data('placement', "bottom");
}
$(".password-input").popover({
html: true,
title: '@UI.PasswordFollowingRequirements',
content: function() {
return $('#password-hint-popup').html();
}
})
.blur(function() {
$(this).popover('hide');
});
});
</script>
}

View file

@ -1,6 +1,6 @@
@using WebsitePanel.WebDavPortal.Resources
@using WebsitePanel.WebDavPortal.UI.Routes
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetEmailModel
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetLoginModel
@{
Layout = "~/Views/Shared/_Layout.cshtml";
@ -8,7 +8,7 @@
<div class="container row">
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetEmail, FormMethod.Post, new { @class = "user-password-reset-email bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetLogin, FormMethod.Post, new { @class = "user-password-reset-email bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
{
<div class="form-group">
<h3>@UI.PasswordReset</h3>
@ -18,6 +18,6 @@
@Html.TextBoxFor(x => x.Email, new { @class = "form-control", placeholder = UI.Login })
@Html.ValidationMessageFor(x => x.Email)
</div>
<button type="submit" class="btn btn-default">@UI.SendEmail</button>
<button type="submit" class="btn btn-default">@UI.Next</button>
}
</div>

View file

@ -1,6 +1,6 @@
@using WebsitePanel.WebDavPortal.Resources
@using WebsitePanel.WebDavPortal.UI.Routes
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetSmsModel
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetPincodeModel
@{
Layout = "~/Views/Shared/_Layout.cshtml";
@ -9,7 +9,7 @@
@if (Model.IsTokenExist)
{
<div class="container row">
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetSms, FormMethod.Post, new {@class = "user-password-reset-sms bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset"}))
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetPincode, FormMethod.Post, new {@class = "user-password-reset-sms bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset"}))
{
@Html.HiddenFor(x=>x.IsTokenExist)
@ -17,9 +17,9 @@
<h3>@UI.PasswordReset</h3>
</div>
<div class="form-group">
<label for="@Html.IdFor(x => x.Sms)" class="control-label">@Html.Raw(string.Format(Messages.PasswordResetSmsHintFormat, Html.RouteLink(UI.TryAgain.ToLowerInvariant(), AccountRouteNames.PasswordResetSendSms)))</label>
<label for="@Html.IdFor(x => x.Sms)" class="control-label">@Html.Raw(string.Format(Messages.PasswordResetSmsHintFormat, Html.RouteLink(UI.TryAgain.ToLowerInvariant(), AccountRouteNames.PasswordResetPincodeSendOptions)))</label>
<div >
@Html.TextBoxFor(x => x.Sms, new {@class = "form-control", placeholder = UI.Sms})
@Html.TextBoxFor(x => x.Sms, new {@class = "form-control", placeholder = UI.Pincode})
@Html.ValidationMessageFor(x => x.Sms)
</div>
</div>

View file

@ -0,0 +1,55 @@
@using WebsitePanel.WebDav.Core.Extensions
@using WebsitePanel.WebDavPortal.Models.Account.Enums
@using WebsitePanel.WebDavPortal.Resources
@using WebsitePanel.WebDavPortal.UI.Routes
@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetPincodeSendOptionsModel
@{
var indexOf = Model.Email.IndexOf('@');
var maskedEmail = string.Empty;
for (int i = 0; i < indexOf - 1; i++)
{
maskedEmail += '*';
}
maskedEmail += Model.Email.Substring(indexOf - 1);
var maskedPhone = string.Empty;
for (int i = 0; i < Model.MobileNumber.Count() - 5; i++)
{
maskedPhone += '*';
}
maskedPhone += Model.MobileNumber.Tail(4);
}
<div class="container row">
@using (Html.BeginRouteForm(AccountRouteNames.PasswordResetPincodeSendOptions, FormMethod.Post, new { @class = "user-password-pincode-send-options bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
{
<div class="form-group">
<h3>@UI.PasswordReset</h3>
</div>
<div class="form-group">
<div class="input-group">
<label class="control-label">@UI.SendPincodeTo </label>
</div>
<div class="radio">
<label for="mobile-radio">
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Mobile, new { id = "mobile-radio" })
@UI.MobilePhone: @maskedPhone
</label>
</div>
<div class="radio">
<label for="email-radio">
@Html.RadioButtonFor(x => x.Method, PincodeSendMethod.Email, new { id = "email-radio" })
@UI.Email: @maskedEmail
</label>
</div>
</div>
<button type="submit" class="btn btn-default">@UI.Send</button>
}
</div>

View file

@ -8,7 +8,7 @@
<div class="form-group">
<label for="@Html.IdFor(x => x.NewPassword)" class="col-sm-2 control-label">@UI.NewPassword</label>
<div class="col-sm-10">
@Html.PasswordFor(x => x.NewPassword, new { @class = "form-control", placeholder = UI.NewPassword, maxlength })
@Html.PasswordFor(x => x.NewPassword, new { @class = "form-control password-input", placeholder = UI.NewPassword, maxlength })
@Html.Raw(HttpUtility.HtmlDecode(Html.ValidationMessageFor(m => m.NewPassword).ToHtmlString()))
</div>
</div>
@ -16,7 +16,7 @@
<div class="form-group">
<label for="@Html.IdFor(x => x.NewPasswordConfirmation)" class="col-sm-2 control-label">@UI.NewPasswordConfirmation</label>
<div class="col-sm-10">
@Html.PasswordFor(x => x.NewPasswordConfirmation, new { @class = "form-control", placeholder = UI.NewPasswordConfirmation, maxlength })
@Html.PasswordFor(x => x.NewPasswordConfirmation, new { @class = "form-control" , placeholder = UI.NewPasswordConfirmation, maxlength })
@Html.ValidationMessageFor(x => x.NewPasswordConfirmation)
</div>
</div>

View file

@ -54,6 +54,7 @@
<add key="UserGroupsKey" value="UserGroups" />
<add key="OwaEditFoldersSession" value="OwaEditFolders" />
<add key="PasswordResetSmsKey" value="PasswordResetSms" />
<add key="AccountIdKey" value="AccountId" />
</sessionKeys>
<fileIcons defaultPath="~/Content/Images/other-icon.png" folderPath="~/Content/Images/folder_100x100.png">
<add extension=".txt" path="~/Content/Images/txt-icon.png" />

View file

@ -196,9 +196,12 @@
<Compile Include="Mapping\Profiles\Webdav\ResourceTableItemProfile.cs" />
<Compile Include="ModelBinders\DataTables\JqueryDataTableModelBinder.cs" />
<Compile Include="Models\AccountModel.cs" />
<Compile Include="Models\Account\Enums\PincodeSendMethod.cs" />
<Compile Include="Models\Account\PasswordChangeModel.cs" />
<Compile Include="Models\Account\PasswordResetEmailModel.cs" />
<Compile Include="Models\Account\PasswordResetSmsModel.cs" />
<Compile Include="Models\Account\PasswordResetLoginModel.cs" />
<Compile Include="Models\Account\PasswordResetFinalStepModel.cs" />
<Compile Include="Models\Account\PasswordResetPincodeSendOptionsModel.cs" />
<Compile Include="Models\Account\PasswordResetPincodeModel.cs" />
<Compile Include="Models\Account\UserProfile.cs" />
<Compile Include="Models\Common\AjaxModel.cs" />
<Compile Include="Models\Common\DataTable\JqueryDataTableBaseEntity.cs" />
@ -485,11 +488,12 @@
<Content Include="Views\Shared\EditorTemplates\CountrySelector.cshtml" />
<Content Include="Views\Account\PasswordChange.cshtml" />
<Content Include="Views\Shared\EditorTemplates\PasswordEditor.cshtml" />
<Content Include="Views\Account\PasswordResetEmail.cshtml" />
<Content Include="Views\Account\PasswordResetLogin.cshtml" />
<Content Include="Views\Account\PasswordResetEmailSent.cshtml" />
<Content Include="Views\Account\PasswordResetSms.cshtml" />
<Content Include="Views\Account\PasswordResetPincode.cshtml" />
<Content Include="Views\Account\PasswordResetFinalStep.cshtml" />
<Content Include="Views\Account\PasswordSuccessfullyChanged.cshtml" />
<Content Include="Views\Account\PasswordResetPincodeSendOptions.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\FileSystem\Enums\" />
@ -510,6 +514,7 @@
<EmbeddedResource Include="Resources\Messages.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Messages.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\UI.resx">
<Generator>PublicResXFileCodeGenerator</Generator>

View file

@ -124,7 +124,7 @@ table.BorderFillBox td .Brick {padding:0; line-height:normal; margin-bottom:9px;
.GridFooter {clear:both; font-size:8pt; color:#888; padding:8px 5px; border:1px solid #ddd; margin:10px 0 20px 0;}
.GridFooter img {vertical-align:-2px !important;}
.FormBody fieldset {padding:5px 10px 10px 10px; border:1px solid #ccc; margin-top:10px;}
.PreviewArea {background:#f0ad4e; padding:15px; margin:20px; color:#fff; font-size:14px;}
.PreviewArea {background:#f0ad4e; padding:15px; margin:20px; color:#000; font-size:14px;}
.HostingPlanGroup .Header {clear:both; background:#aa73c1; color:#fff; height:30px !important; line-height:30px;}
.HostingPlanGroup .Header span {font-size:inherit; line-height:inherit;}
.HostingPlanGroup .Header .Left {float:left; font-weight:bold;}

View file

@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ddlPriorityItem.High" xml:space="preserve">
<value>High</value>
</data>
<data name="ddlPriorityItem.Low" xml:space="preserve">
<value>Low</value>
</data>
<data name="ddlPriorityItem.Normal" xml:space="preserve">
<value>Normal</value>
</data>
<data name="lblFrom.Text" xml:space="preserve">
<value>From:</value>
</data>
<data name="lblHtmlBody.Text" xml:space="preserve">
<value>HTML Body:</value>
</data>
<data name="lblLogoUrl.Text" xml:space="preserve">
<value>Logo Url:</value>
</data>
<data name="lblNoChangesHtmlBody" xml:space="preserve">
<value>No Changes HTML Body:</value>
</data>
<data name="lblNoChangesTextBody.Text" xml:space="preserve">
<value>No Changes Text Body:</value>
</data>
<data name="lblPasswordResetLinkSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Sms Body:</value>
</data>
<data name="lblPasswordResetPincodeSmsBody.Text" xml:space="preserve">
<value>Password Reset Link Pincode Body:</value>
</data>
<data name="lblPriority.Text" xml:space="preserve">
<value>Priority:</value>
</data>
<data name="lblSubject.Text" xml:space="preserve">
<value>Subject:</value>
</data>
<data name="lblTextBody.Text" xml:space="preserve">
<value>Text Body:</value>
</data>
</root>

View file

@ -192,4 +192,7 @@
<data name="TwilioSettings.Text" xml:space="preserve">
<value>Twilio</value>
</data>
<data name="lblPasswordResetLinkLifeSpan.Text" xml:space="preserve">
<value>Password Reset Link Life Span (hours):</value>
</data>
</root>

View file

@ -156,4 +156,7 @@
<data name="lnkOrganizationUserPasswordResetLetter.Text" xml:space="preserve">
<value>Organization User Password Reset Letter</value>
</data>
<data name="lnkOrganizationUserPasswordResetPincodeLetter.Text" xml:space="preserve">
<value>Organization User Password Reset Pincode Letter</value>
</data>
</root>

View file

@ -120,6 +120,9 @@
<data name="btnResetPassoword.Text" xml:space="preserve">
<value>Send Password Reset Email</value>
</data>
<data name="chkDontSaveAsMobile.Text" xml:space="preserve">
<value>Don't save as user mobile</value>
</data>
<data name="locEmailAddress.Text" xml:space="preserve">
<value>Email:</value>
</data>

View file

@ -45,6 +45,7 @@
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
<td>
<asp:TextBox runat="server" ID="txtMobile" CssClass="TextBox200" />
<asp:CheckBox ID="chkDontSaveAsMobile" runat="server" Text="Don't save as mobile" meta:resourcekey="chkDontSaveAsMobile" Checked="True" />
<asp:RequiredFieldValidator ID="valMobile" runat="server" ErrorMessage="*" ControlToValidate="txtMobile" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="regexMobileValid" runat="server" ValidationExpression="^\+?\d+$" ValidationGroup="ResetUserPassword" ControlToValidate="txtMobile" ErrorMessage="Invalid Mobile Format"></asp:RegularExpressionValidator>
</td>

View file

@ -39,11 +39,13 @@ namespace WebsitePanel.Portal.ExchangeServer
if (rbtnEmail.Checked)
{
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID,PanelRequest.AccountID, txtReason.Text, txtEmailAddress.Text, true);
ES.Services.Organizations.SendResetUserPasswordEmail(PanelRequest.ItemID, PanelRequest.AccountID,
txtReason.Text, txtEmailAddress.Text, true);
}
else
{
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID, PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
var result = ES.Services.Organizations.SendResetUserPasswordLinkSms(PanelRequest.ItemID,
PanelRequest.AccountID, txtReason.Text, txtMobile.Text);
if (!result.IsSuccess)
{
@ -51,6 +53,49 @@ namespace WebsitePanel.Portal.ExchangeServer
return;
}
if (chkDontSaveAsMobile.Checked == false)
{
OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
PanelRequest.AccountID);
ES.Services.Organizations.SetUserGeneralSettings(
PanelRequest.ItemID, PanelRequest.AccountID,
user.DisplayName,
string.Empty,
false,
user.Disabled,
user.Locked,
user.FirstName,
user.Initials,
user.LastName,
user.Address,
user.City,
user.State,
user.Zip,
user.Country,
user.JobTitle,
user.Company,
user.Department,
user.Office,
user.Manager == null ? null : user.Manager.AccountName,
user.BusinessPhone,
user.Fax,
user.HomePhone,
txtMobile.Text,
user.Pager,
user.WebPage,
user.Notes,
user.ExternalEmail,
user.SubscriberNumber,
user.LevelId,
user.IsVIP,
user.UserMustChangePassword);
}
}
Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),

View file

@ -147,6 +147,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtMobile;
/// <summary>
/// chkDontSaveAsMobile control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkDontSaveAsMobile;
/// <summary>
/// valMobile control.
/// </summary>

View file

@ -49,12 +49,5 @@
<td class="Normal" colspan="2">
<asp:TextBox ID="txtBodyPasswordResetLinkSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetPincodeSmsBody" runat="server" meta:resourcekey="lblPasswordResetPincodeSmsBody" Text="Password Reset Link Pincode Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtPasswordResetPincodeSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -20,7 +20,6 @@ namespace WebsitePanel.Portal
txtLogoUrl.Text = settings["LogoUrl"];
txtBodyPasswordResetLinkSmsBody.Text = settings["PasswordResetLinkSmsBody"];
txtPasswordResetPincodeSmsBody.Text = settings["PasswordResetPincodeSmsBody"];
}
public void SaveSettings(UserSettings settings)
@ -33,7 +32,6 @@ namespace WebsitePanel.Portal
settings["LogoUrl"] = txtLogoUrl.Text;
settings["PasswordResetLinkSmsBody"]= txtBodyPasswordResetLinkSmsBody.Text;
settings["PasswordResetPincodeSmsBody"] =txtPasswordResetPincodeSmsBody.Text;
}
}
}

View file

@ -137,23 +137,5 @@ namespace WebsitePanel.Portal {
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtBodyPasswordResetLinkSmsBody;
/// <summary>
/// lblPasswordResetPincodeSmsBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPasswordResetPincodeSmsBody;
/// <summary>
/// txtPasswordResetPincodeSmsBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPasswordResetPincodeSmsBody;
}
}

View file

@ -0,0 +1,55 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordResetPincodeLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordResetPincodeLetter" %>
<table>
<tr>
<td class="SubHead" width="150" nowrap><asp:Label ID="lblFrom" runat="server" meta:resourcekey="lblFrom" Text="From:"></asp:Label></td>
<td class="Normal" width="100%">
<asp:TextBox ID="txtFrom" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblSubject" runat="server" meta:resourcekey="lblSubject" Text="Subject:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtSubject" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblPriority" runat="server" meta:resourcekey="lblPriority" Text="Priority"></asp:Label></td>
<td class="Normal">
<asp:DropDownList ID="ddlPriority" runat="server" CssClass="NormalTextBox" resourcekey="ddlPriority">
<asp:ListItem Value="High">High</asp:ListItem>
<asp:ListItem Value="Normal">Normal</asp:ListItem>
<asp:ListItem Value="Low">Low</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="SubHead"><asp:Label ID="lblLogoUrl" runat="server" meta:resourcekey="lblLogoUrl" Text="Logo Url:"></asp:Label></td>
<td class="Normal">
<asp:TextBox ID="txtLogoUrl" runat="server" Width="500px" CssClass="NormalTextBox"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblHtmlBody" runat="server" meta:resourcekey="lblHtmlBody" Text="HTML Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtHtmlBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblTextBody" runat="server" meta:resourcekey="lblTextBody" Text="Text Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtTextBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
<tr>
<td class="SubHead" colspan="2"><br /><br /><asp:Label ID="lblPasswordResetPincodeSmsBody" runat="server" meta:resourcekey="lblPasswordResetPincodeSmsBody" Text="Password Reset Link Pincode Body:"></asp:Label></td>
</tr>
<tr>
<td class="Normal" colspan="2">
<asp:TextBox ID="txtPasswordResetPincodeSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
</tr>
</table>

View file

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebsitePanel.EnterpriseServer;
namespace WebsitePanel.Portal
{
public partial class SettingsUserPasswordResetPincodeLetter : WebsitePanelControlBase, IUserSettingsEditorControl
{
public void BindSettings(UserSettings settings)
{
txtFrom.Text = settings["From"];
txtSubject.Text = settings["Subject"];
Utils.SelectListItem(ddlPriority, settings["Priority"]);
txtHtmlBody.Text = settings["HtmlBody"];
txtTextBody.Text = settings["TextBody"];
txtLogoUrl.Text = settings["LogoUrl"];
txtPasswordResetPincodeSmsBody.Text = settings["PasswordResetPincodeSmsBody"];
}
public void SaveSettings(UserSettings settings)
{
settings["From"] = txtFrom.Text;
settings["Subject"] = txtSubject.Text;
settings["Priority"] = ddlPriority.SelectedValue;
settings["HtmlBody"] = txtHtmlBody.Text;
settings["TextBody"] = txtTextBody.Text;
settings["LogoUrl"] = txtLogoUrl.Text;
settings["PasswordResetPincodeSmsBody"] = txtPasswordResetPincodeSmsBody.Text;
}
}
}

View file

@ -0,0 +1,141 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace WebsitePanel.Portal {
public partial class SettingsUserPasswordResetPincodeLetter {
/// <summary>
/// lblFrom control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblFrom;
/// <summary>
/// txtFrom control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtFrom;
/// <summary>
/// lblSubject control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblSubject;
/// <summary>
/// txtSubject control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtSubject;
/// <summary>
/// lblPriority control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPriority;
/// <summary>
/// ddlPriority control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
/// <summary>
/// lblLogoUrl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblLogoUrl;
/// <summary>
/// txtLogoUrl control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtLogoUrl;
/// <summary>
/// lblHtmlBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblHtmlBody;
/// <summary>
/// txtHtmlBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
/// <summary>
/// lblTextBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblTextBody;
/// <summary>
/// txtTextBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtTextBody;
/// <summary>
/// lblPasswordResetPincodeSmsBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPasswordResetPincodeSmsBody;
/// <summary>
/// txtPasswordResetPincodeSmsBody control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPasswordResetPincodeSmsBody;
}
}

View file

@ -92,10 +92,15 @@
<asp:CheckBox ID="chkEnablePasswordReset" runat="server" Text="Yes" meta:resourcekey="chkEnablePasswordReset" />
</td>
</tr>
<tr>
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblPasswordResetLinkLifeSpan" runat="server" meta:resourcekey="lblPasswordResetLinkLifeSpan" />
<td><asp:TextBox runat="server" ID="txtPasswordResetLinkLifeSpan" Width="450px" /></td>
</tr>
<tr>
<td class="SubHead" style="width:200px;"><asp:Localize ID="lblWebdavPortalUrl" runat="server" meta:resourcekey="lblWebdavPortalUrl" />
<td><asp:TextBox runat="server" ID="txtWebdavPortalUrl" Width="450px" /></td>
</tr>
</table>
</asp:Panel>

View file

@ -166,6 +166,7 @@ namespace WebsitePanel.Portal
{
chkEnablePasswordReset.Checked = Utils.ParseBool(settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY], false);
txtWebdavPortalUrl.Text = settings[WEBDAV_PORTAL_URL];
txtPasswordResetLinkLifeSpan.Text = settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN];
}
// Twilio portal
@ -262,6 +263,7 @@ namespace WebsitePanel.Portal
settings = new WSP.SystemSettings();
settings[WEBDAV_PORTAL_URL] = txtWebdavPortalUrl.Text;
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY] = chkEnablePasswordReset.Checked.ToString();
settings[WSP.SystemSettings.WEBDAV_PASSWORD_RESET_LINK_LIFE_SPAN] = txtPasswordResetLinkLifeSpan.Text;
result = ES.Services.System.SetSystemSettings(WSP.SystemSettings.WEBDAV_PORTAL_SETTINGS, settings);
if (result < 0)

View file

@ -264,6 +264,24 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox chkEnablePasswordReset;
/// <summary>
/// lblPasswordResetLinkLifeSpan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Localize lblPasswordResetLinkLifeSpan;
/// <summary>
/// txtPasswordResetLinkLifeSpan control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox txtPasswordResetLinkLifeSpan;
/// <summary>
/// lblWebdavPortalUrl control.
/// </summary>

View file

@ -50,6 +50,10 @@
<asp:HyperLink ID="lnkOrganizationUserPasswordResetLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetLetter"
Text="User Password Reset Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetLetter", "SettingsUserPasswordResetLetter") %>'></asp:HyperLink>
</li>
<li>
<asp:HyperLink ID="lnkOrganizationUserPasswordResetPincodeLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetPincodeLetter"
Text="User Password Reset Pincode Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetPincodeLetter", "SettingsUserPasswordResetPincodeLetter") %>'></asp:HyperLink>
</li>
</ul>
</div>
<div class="FormFooter">

View file

@ -120,6 +120,15 @@ namespace WebsitePanel.Portal {
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetLetter;
/// <summary>
/// lnkOrganizationUserPasswordResetPincodeLetter control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetPincodeLetter;
/// <summary>
/// btnCancel control.
/// </summary>

View file

@ -350,6 +350,10 @@
<DependentUpon>UserPasswordExpirationNotificationView.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SettingsUserPasswordResetPincodeLetter.ascx.cs">
<DependentUpon>SettingsUserPasswordResetPincodeLetter.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="SearchObject.ascx.cs">
<DependentUpon>SearchObject.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -357,6 +361,9 @@
<Compile Include="SearchObject.ascx.designer.cs">
<DependentUpon>SearchObject.ascx</DependentUpon>
</Compile>
<Compile Include="SettingsUserPasswordResetPincodeLetter.ascx.designer.cs">
<DependentUpon>SettingsUserPasswordResetPincodeLetter.ascx</DependentUpon>
</Compile>
<Compile Include="VPS2012\RemoteDesktop\Connect.aspx.cs">
<DependentUpon>Connect.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -4900,6 +4907,7 @@
<Content Include="ScheduleTaskControls\UserPasswordExpirationNotificationView.ascx" />
<Content Include="SettingsUserPasswordExpirationLetter.ascx" />
<Content Include="SettingsUserPasswordResetLetter.ascx" />
<Content Include="SettingsUserPasswordResetPincodeLetter.ascx" />
<Content Include="VPS2012\RemoteDesktop\Connect.aspx" />
<Content Include="VPS2012\RemoteDesktop\msrdp.cab" />
<Content Include="VPS2012\TestVirtualMachineTemplate.aspx" />
@ -5014,6 +5022,7 @@
</Content>
<Content Include="ExchangeServer\App_LocalResources\OrganizationSettingsGeneralSettings.ascx.resx" />
<Content Include="App_LocalResources\SettingsUserPasswordResetLetter.ascx.resx" />
<Content Include="App_LocalResources\SettingsUserPasswordResetPincodeLetter.ascx.resx" />
<Content Include="App_LocalResources\VpsMenu.ascx.resx">
<SubType>Designer</SubType>
</Content>