Merge
This commit is contained in:
commit
ab1d7fef54
64 changed files with 3129 additions and 523 deletions
|
@ -51,7 +51,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
private bool isDemo;
|
||||
private string comments;
|
||||
private string username;
|
||||
private string password;
|
||||
// private string password;
|
||||
private string firstName;
|
||||
private string lastName;
|
||||
private string email;
|
||||
|
@ -78,6 +78,39 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
}
|
||||
|
||||
public UserInfo(UserInfo src)
|
||||
{
|
||||
userId = src.userId;
|
||||
ownerId = src.ownerId;
|
||||
roleId = src.roleId;
|
||||
statusId = src.statusId;
|
||||
loginStatusId = src.loginStatusId;
|
||||
failedLogins = src.failedLogins;
|
||||
created = src.created;
|
||||
changed = src.changed;
|
||||
isPeer = src.isPeer;
|
||||
isDemo = src.isDemo;
|
||||
comments = src.comments;
|
||||
username = src.username;
|
||||
firstName = src.firstName;
|
||||
lastName = src.lastName;
|
||||
email = src.email;
|
||||
secondaryEmail = src.secondaryEmail;
|
||||
address = src.address;
|
||||
city = src.city;
|
||||
country = src.country;
|
||||
state = src.state;
|
||||
zip = src.zip;
|
||||
primaryPhone = src.primaryPhone;
|
||||
secondaryPhone = src.secondaryPhone;
|
||||
fax = src.fax;
|
||||
instantMessenger = src.instantMessenger;
|
||||
htmlMail = src.htmlMail;
|
||||
companyName = src.companyName;
|
||||
ecommerceEnabled = src.ecommerceEnabled;
|
||||
subscriberNumber = src.subscriberNumber;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User role ID:
|
||||
/// Administrator = 1,
|
||||
|
@ -200,11 +233,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
set { this.username = value; }
|
||||
}
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return this.password; }
|
||||
set { this.password = value; }
|
||||
}
|
||||
// public string Password
|
||||
// {
|
||||
// get { return this.password; }
|
||||
// set { this.password = value; }
|
||||
// }
|
||||
|
||||
public string FirstName
|
||||
{
|
||||
|
@ -347,7 +380,18 @@ namespace WebsitePanel.EnterpriseServer
|
|||
{
|
||||
public ushort VLanID { get; set; }
|
||||
public string Comment { get; set; }
|
||||
}
|
||||
};
|
||||
|
||||
public class UserInfoInternal : UserInfo
|
||||
{
|
||||
private string password;
|
||||
|
||||
public string Password
|
||||
{
|
||||
get { return this.password; }
|
||||
set { this.password = value; }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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_REQUEST_LETTER = "OrganizationUserPasswordRequestLetter";
|
||||
public const string USER_PASSWORD_RESET_PINCODE_LETTER = "UserPasswordResetPincodeLetter";
|
||||
public const string HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy";
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
// 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;
|
||||
|
@ -37,6 +36,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
|
||||
public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol {
|
||||
|
||||
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddSupportServiceLevelOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback GetSupportServiceLevelOperationCompleted;
|
||||
|
@ -93,6 +96,10 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
|
||||
private System.Threading.SendOrPostCallback SendResetUserPasswordPincodeEmailOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SendUserPasswordRequestSmsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SendUserPasswordRequestEmailOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback AddOrganizationDomainOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback ChangeOrganizationDomainTypeOperationCompleted;
|
||||
|
@ -165,15 +172,17 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
|
||||
private System.Threading.SendOrPostCallback GetSupportServiceLevelsOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback UpdateSupportServiceLevelOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback DeleteSupportServiceLevelOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public esOrganizations() {
|
||||
this.Url = "http://localhost:9002/esOrganizations.asmx";
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddSupportServiceLevelCompletedEventHandler AddSupportServiceLevelCompleted;
|
||||
|
||||
|
@ -258,6 +267,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
/// <remarks/>
|
||||
public event SendResetUserPasswordPincodeEmailCompletedEventHandler SendResetUserPasswordPincodeEmailCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SendUserPasswordRequestSmsCompletedEventHandler SendUserPasswordRequestSmsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SendUserPasswordRequestEmailCompletedEventHandler SendUserPasswordRequestEmailCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event AddOrganizationDomainCompletedEventHandler AddOrganizationDomainCompleted;
|
||||
|
||||
|
@ -367,10 +382,90 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
public event GetSupportServiceLevelsCompletedEventHandler GetSupportServiceLevelsCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event UpdateSupportServiceLevelCompletedEventHandler UpdateSupportServiceLevelCompleted;
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
|
||||
this.Invoke("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public event DeleteSupportServiceLevelCompletedEventHandler DeleteSupportServiceLevelCompleted;
|
||||
public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
|
||||
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
|
||||
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
|
||||
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
|
||||
if ((this.UpdateSupportServiceLevelCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ResultObject DeleteSupportServiceLevel(int levelId) {
|
||||
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
|
||||
levelId});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
|
||||
levelId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteSupportServiceLevelAsync(int levelId) {
|
||||
this.DeleteSupportServiceLevelAsync(levelId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
|
||||
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
|
||||
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
|
||||
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
|
||||
if ((this.DeleteSupportServiceLevelCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <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)]
|
||||
|
@ -1603,6 +1698,107 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestSms", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo) {
|
||||
object[] results = this.Invoke("SendUserPasswordRequestSms", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
phoneTo});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SendUserPasswordRequestSms", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
phoneTo}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndSendUserPasswordRequestSms(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo) {
|
||||
this.SendUserPasswordRequestSmsAsync(itemId, accountId, reason, phoneTo, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SendUserPasswordRequestSmsAsync(int itemId, int accountId, string reason, string phoneTo, object userState) {
|
||||
if ((this.SendUserPasswordRequestSmsOperationCompleted == null)) {
|
||||
this.SendUserPasswordRequestSmsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestSmsOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SendUserPasswordRequestSms", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
phoneTo}, this.SendUserPasswordRequestSmsOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSendUserPasswordRequestSmsOperationCompleted(object arg) {
|
||||
if ((this.SendUserPasswordRequestSmsCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SendUserPasswordRequestSmsCompleted(this, new SendUserPasswordRequestSmsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SendUserPasswordRequestEmail", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
|
||||
this.Invoke("SendUserPasswordRequestEmail", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
mailTo,
|
||||
finalStep});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginSendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("SendUserPasswordRequestEmail", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
mailTo,
|
||||
finalStep}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndSendUserPasswordRequestEmail(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep) {
|
||||
this.SendUserPasswordRequestEmailAsync(itemId, accountId, reason, mailTo, finalStep, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void SendUserPasswordRequestEmailAsync(int itemId, int accountId, string reason, string mailTo, bool finalStep, object userState) {
|
||||
if ((this.SendUserPasswordRequestEmailOperationCompleted == null)) {
|
||||
this.SendUserPasswordRequestEmailOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendUserPasswordRequestEmailOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("SendUserPasswordRequestEmail", new object[] {
|
||||
itemId,
|
||||
accountId,
|
||||
reason,
|
||||
mailTo,
|
||||
finalStep}, this.SendUserPasswordRequestEmailOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnSendUserPasswordRequestEmailOperationCompleted(object arg) {
|
||||
if ((this.SendUserPasswordRequestEmailCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.SendUserPasswordRequestEmailCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(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) {
|
||||
|
@ -3517,98 +3713,42 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public void UpdateSupportServiceLevel(int levelID, string levelName, string levelDescription) {
|
||||
this.Invoke("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription});
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginUpdateSupportServiceLevel(int levelID, string levelName, string levelDescription, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void EndUpdateSupportServiceLevel(System.IAsyncResult asyncResult) {
|
||||
this.EndInvoke(asyncResult);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription) {
|
||||
this.UpdateSupportServiceLevelAsync(levelID, levelName, levelDescription, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void UpdateSupportServiceLevelAsync(int levelID, string levelName, string levelDescription, object userState) {
|
||||
if ((this.UpdateSupportServiceLevelOperationCompleted == null)) {
|
||||
this.UpdateSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateSupportServiceLevelOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("UpdateSupportServiceLevel", new object[] {
|
||||
levelID,
|
||||
levelName,
|
||||
levelDescription}, this.UpdateSupportServiceLevelOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnUpdateSupportServiceLevelOperationCompleted(object arg) {
|
||||
if ((this.UpdateSupportServiceLevelCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.UpdateSupportServiceLevelCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSupportServiceLevel", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public ResultObject DeleteSupportServiceLevel(int levelId) {
|
||||
object[] results = this.Invoke("DeleteSupportServiceLevel", new object[] {
|
||||
levelId});
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginDeleteSupportServiceLevel(int levelId, System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("DeleteSupportServiceLevel", new object[] {
|
||||
levelId}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public ResultObject EndDeleteSupportServiceLevel(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((ResultObject)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteSupportServiceLevelAsync(int levelId) {
|
||||
this.DeleteSupportServiceLevelAsync(levelId, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void DeleteSupportServiceLevelAsync(int levelId, object userState) {
|
||||
if ((this.DeleteSupportServiceLevelOperationCompleted == null)) {
|
||||
this.DeleteSupportServiceLevelOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSupportServiceLevelOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("DeleteSupportServiceLevel", new object[] {
|
||||
levelId}, this.DeleteSupportServiceLevelOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnDeleteSupportServiceLevelOperationCompleted(object arg) {
|
||||
if ((this.DeleteSupportServiceLevelCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.DeleteSupportServiceLevelCompleted(this, new DeleteSupportServiceLevelCompletedEventArgs(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 UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DeleteSupportServiceLevelCompletedEventArgs(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 AddSupportServiceLevelCompletedEventHandler(object sender, AddSupportServiceLevelCompletedEventArgs e);
|
||||
|
@ -4227,6 +4367,36 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SendUserPasswordRequestSmsCompletedEventHandler(object sender, SendUserPasswordRequestSmsCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class SendUserPasswordRequestSmsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal SendUserPasswordRequestSmsCompletedEventArgs(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 SendUserPasswordRequestEmailCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void AddOrganizationDomainCompletedEventHandler(object sender, AddOrganizationDomainCompletedEventArgs e);
|
||||
|
@ -5096,34 +5266,4 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void UpdateSupportServiceLevelCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void DeleteSupportServiceLevelCompletedEventHandler(object sender, DeleteSupportServiceLevelCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class DeleteSupportServiceLevelCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal DeleteSupportServiceLevelCompletedEventArgs(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]));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
|
||||
private System.Threading.SendOrPostCallback GetSystemSettingsActiveOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback CheckIsTwilioEnabledOperationCompleted;
|
||||
|
||||
private System.Threading.SendOrPostCallback SetSystemSettingsOperationCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -44,6 +46,9 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
/// <remarks/>
|
||||
public event GetSystemSettingsActiveCompletedEventHandler GetSystemSettingsActiveCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event CheckIsTwilioEnabledCompletedEventHandler CheckIsTwilioEnabledCompleted;
|
||||
|
||||
/// <remarks/>
|
||||
public event SetSystemSettingsCompletedEventHandler SetSystemSettingsCompleted;
|
||||
|
||||
|
@ -132,6 +137,44 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CheckIsTwilioEnabled", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public bool CheckIsTwilioEnabled() {
|
||||
object[] results = this.Invoke("CheckIsTwilioEnabled", new object[0]);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginCheckIsTwilioEnabled(System.AsyncCallback callback, object asyncState) {
|
||||
return this.BeginInvoke("CheckIsTwilioEnabled", new object[0], callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool EndCheckIsTwilioEnabled(System.IAsyncResult asyncResult) {
|
||||
object[] results = this.EndInvoke(asyncResult);
|
||||
return ((bool)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckIsTwilioEnabledAsync() {
|
||||
this.CheckIsTwilioEnabledAsync(null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void CheckIsTwilioEnabledAsync(object userState) {
|
||||
if ((this.CheckIsTwilioEnabledOperationCompleted == null)) {
|
||||
this.CheckIsTwilioEnabledOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCheckIsTwilioEnabledOperationCompleted);
|
||||
}
|
||||
this.InvokeAsync("CheckIsTwilioEnabled", new object[0], this.CheckIsTwilioEnabledOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnCheckIsTwilioEnabledOperationCompleted(object arg) {
|
||||
if ((this.CheckIsTwilioEnabledCompleted != null)) {
|
||||
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
|
||||
this.CheckIsTwilioEnabledCompleted(this, new CheckIsTwilioEnabledCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSystemSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int SetSystemSettings(string settingsName, SystemSettings settings) {
|
||||
|
@ -234,6 +277,32 @@ namespace WebsitePanel.EnterpriseServer {
|
|||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void CheckIsTwilioEnabledCompletedEventHandler(object sender, CheckIsTwilioEnabledCompletedEventArgs e);
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||
[System.ComponentModel.DesignerCategoryAttribute("code")]
|
||||
public partial class CheckIsTwilioEnabledCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
|
||||
|
||||
private object[] results;
|
||||
|
||||
internal CheckIsTwilioEnabledCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
|
||||
base(exception, cancelled, userState) {
|
||||
this.results = results;
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public bool Result {
|
||||
get {
|
||||
this.RaiseExceptionIfNecessary();
|
||||
return ((bool)(this.results[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
|
||||
public delegate void SetSystemSettingsCompletedEventHandler(object sender, SetSystemSettingsCompletedEventArgs e);
|
||||
|
|
|
@ -840,20 +840,23 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
/// <remarks/>
|
||||
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://smbsaas/websitepanel/enterpriseserver/AddUser", RequestNamespace = "http://smbsaas/websitepanel/enterpriseserver", ResponseNamespace = "http://smbsaas/websitepanel/enterpriseserver", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
|
||||
public int AddUser(UserInfo user, bool sendLetter)
|
||||
public int AddUser(UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
object[] results = this.Invoke("AddUser", new object[] {
|
||||
user,
|
||||
sendLetter});
|
||||
sendLetter,
|
||||
password
|
||||
});
|
||||
return ((int)(results[0]));
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public System.IAsyncResult BeginAddUser(UserInfo user, bool sendLetter, System.AsyncCallback callback, object asyncState)
|
||||
public System.IAsyncResult BeginAddUser(UserInfo user, bool sendLetter, string password, System.AsyncCallback callback, object asyncState)
|
||||
{
|
||||
return this.BeginInvoke("AddUser", new object[] {
|
||||
user,
|
||||
sendLetter}, callback, asyncState);
|
||||
sendLetter,
|
||||
password}, callback, asyncState);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
|
@ -864,13 +867,13 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserAsync(UserInfo user, bool sendLetter)
|
||||
public void AddUserAsync(UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
this.AddUserAsync(user, sendLetter, null);
|
||||
this.AddUserAsync(user, sendLetter, password, null);
|
||||
}
|
||||
|
||||
/// <remarks/>
|
||||
public void AddUserAsync(UserInfo user, bool sendLetter, object userState)
|
||||
public void AddUserAsync(UserInfo user, bool sendLetter, string password, object userState)
|
||||
{
|
||||
if ((this.AddUserOperationCompleted == null))
|
||||
{
|
||||
|
@ -878,7 +881,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
this.InvokeAsync("AddUser", new object[] {
|
||||
user,
|
||||
sendLetter}, this.AddUserOperationCompleted, userState);
|
||||
sendLetter,
|
||||
password}, this.AddUserOperationCompleted, userState);
|
||||
}
|
||||
|
||||
private void OnAddUserOperationCompleted(object arg)
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
protected override string AuthenticateToken(UsernameToken token)
|
||||
{
|
||||
// try to load user account
|
||||
UserInfo user = UserController.GetUserInternally(token.Username);
|
||||
UserInfoInternal user = UserController.GetUserInternally(token.Username);
|
||||
if (user == null)
|
||||
return null;
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer.ContractSystem
|
|||
//
|
||||
if (customerId > -1)
|
||||
{
|
||||
ES.UserInfo userInfo = (internally) ? ES.UserController.GetUserInternally(customerId) :
|
||||
ES.UserInfoInternal userInfo = (internally) ? ES.UserController.GetUserInternally(customerId) :
|
||||
ES.UserController.GetUser(customerId);
|
||||
//
|
||||
if (internally)
|
||||
|
|
|
@ -520,12 +520,12 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
|
|||
return settings;
|
||||
}
|
||||
|
||||
private CommandParams PrepeareAccountParams(UserInfo userInfo)
|
||||
private CommandParams PrepeareAccountParams(UserInfo userInfo, string password)
|
||||
{
|
||||
CommandParams args = new CommandParams();
|
||||
|
||||
args[CommandParams.USERNAME] = userInfo.Username;
|
||||
args[CommandParams.PASSWORD] = userInfo.Password;
|
||||
args[CommandParams.PASSWORD] = password;
|
||||
args[CommandParams.FIRST_NAME] = userInfo.FirstName;
|
||||
args[CommandParams.LAST_NAME] = userInfo.LastName;
|
||||
args[CommandParams.EMAIL] = userInfo.Email;
|
||||
|
|
|
@ -113,7 +113,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
|
|||
// create user account
|
||||
ES.UserInfo userInfo = new ES.UserInfo();
|
||||
userInfo.Username = account[ContractAccount.USERNAME];
|
||||
userInfo.Password = account[ContractAccount.PASSWORD];
|
||||
// userInfo.Password = account[ContractAccount.PASSWORD];
|
||||
userInfo.Email = account[ContractAccount.EMAIL];
|
||||
userInfo.FirstName = account[ContractAccount.FIRST_NAME];
|
||||
userInfo.LastName = account[ContractAccount.LAST_NAME];
|
||||
|
@ -133,7 +133,7 @@ namespace WebsitePanel.Ecommerce.EnterpriseServer
|
|||
userInfo.OwnerId = contract.ResellerId;
|
||||
userInfo.Created = DateTime.Now;
|
||||
// create account
|
||||
int resultCode = ES.UserController.AddUser(userInfo, true);
|
||||
int resultCode = ES.UserController.AddUser(userInfo, true, account[ContractAccount.PASSWORD]);
|
||||
//
|
||||
if (resultCode > 0)
|
||||
{
|
||||
|
|
|
@ -1632,6 +1632,73 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo = null)
|
||||
{
|
||||
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_REQUEST_SMS",
|
||||
itemId);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
|
||||
if (org == null)
|
||||
{
|
||||
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
|
||||
}
|
||||
|
||||
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
||||
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||
|
||||
user.ItemId = itemId;
|
||||
|
||||
if (string.IsNullOrEmpty(phoneTo))
|
||||
{
|
||||
phoneTo = user.MobilePhone;
|
||||
}
|
||||
|
||||
UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_REQUEST_LETTER);
|
||||
|
||||
|
||||
string body = settings["SMSBody"];
|
||||
|
||||
var pincode = GeneratePincode();
|
||||
Guid token;
|
||||
|
||||
var items = new Hashtable();
|
||||
|
||||
items["passwordResetLink"] = GenerateUserPasswordResetLink(user.ItemId, user.AccountId, out token, pincode);
|
||||
|
||||
body = PackageController.EvaluateTemplate(body, items);
|
||||
|
||||
TaskManager.Write("Organization ID : " + user.ItemId);
|
||||
TaskManager.Write("Account : " + user.DisplayName);
|
||||
TaskManager.Write("Reason : " + reason);
|
||||
TaskManager.Write("SmsTo : " + phoneTo);
|
||||
|
||||
// send Sms message
|
||||
var response = SendSms(phoneTo, body);
|
||||
|
||||
if (response.RestException != null)
|
||||
{
|
||||
throw new Exception(response.RestException.Message);
|
||||
}
|
||||
|
||||
SetAccessTokenResponse(token, pincode);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
TaskManager.WriteError(ex);
|
||||
TaskManager.CompleteResultTask(result);
|
||||
result.AddError("", ex);
|
||||
return result;
|
||||
}
|
||||
|
||||
TaskManager.CompleteResultTask();
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultObject SendResetUserPasswordPincodeSms(Guid token, string phoneTo = null)
|
||||
{
|
||||
var result = TaskManager.StartResultTask<ResultObject>("ORGANIZATION", "SEND_USER_PASSWORD_RESET_SMS_PINCODE");
|
||||
|
@ -1851,6 +1918,33 @@ namespace WebsitePanel.EnterpriseServer
|
|||
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER", finalStep);
|
||||
}
|
||||
|
||||
public static void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
|
||||
{
|
||||
// load organization
|
||||
Organization org = GetOrganization(itemId);
|
||||
|
||||
if (org == null)
|
||||
{
|
||||
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
|
||||
}
|
||||
|
||||
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
|
||||
OrganizationUser user = OrganizationController.GetUserGeneralSettingsWithExtraData(itemId, accountId);
|
||||
|
||||
user.ItemId = itemId;
|
||||
|
||||
if (string.IsNullOrEmpty(mailTo))
|
||||
{
|
||||
mailTo = user.PrimaryEmailAddress;
|
||||
}
|
||||
|
||||
var generalSettings = OrganizationController.GetOrganizationGeneralSettings(itemId);
|
||||
|
||||
var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
|
||||
|
||||
SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_REQUEST_LETTER, "USER_PASSWORD_REQUEST_LETTER", finalStep);
|
||||
}
|
||||
|
||||
public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
|
||||
string mailTo, string logoUrl)
|
||||
{
|
||||
|
@ -1919,8 +2013,6 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static AccessToken GetAccessToken(Guid accessToken, AccessTokenTypes type)
|
||||
{
|
||||
return ObjectUtils.FillObjectFromDataReader<AccessToken>(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
|
||||
|
|
|
@ -422,7 +422,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return result;
|
||||
|
||||
// load user info
|
||||
UserInfo user = UserController.GetUser(userId);
|
||||
UserInfoInternal user = UserController.GetUser(userId);
|
||||
|
||||
if (createFtpAccount)
|
||||
{
|
||||
|
@ -2086,7 +2086,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
items["user"] = user;
|
||||
|
||||
// get reseller details
|
||||
UserInfo reseller = UserController.GetUser(user.OwnerId);
|
||||
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
|
||||
if (reseller != null)
|
||||
{
|
||||
reseller.Password = "";
|
||||
|
@ -2123,7 +2123,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
items["user"] = user;
|
||||
|
||||
// get reseller details
|
||||
UserInfo reseller = UserController.GetUser(user.OwnerId);
|
||||
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
|
||||
if (reseller != null)
|
||||
{
|
||||
reseller.Password = "";
|
||||
|
|
|
@ -112,10 +112,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
UserInfo user = PackageController.GetPackageOwner(item.PackageId);
|
||||
if (user != null)
|
||||
{
|
||||
UserInfoInternal userInternal = UserController.GetUserInternally(user.UserId);
|
||||
|
||||
site.StatisticsUrl = Utils.ReplaceStringVariable(site.StatisticsUrl, "username",
|
||||
HttpUtility.UrlEncode(user.Username));
|
||||
HttpUtility.UrlEncode(userInternal.Username));
|
||||
site.StatisticsUrl = Utils.ReplaceStringVariable(site.StatisticsUrl, "password",
|
||||
HttpUtility.UrlEncode(user.Password));
|
||||
HttpUtility.UrlEncode(userInternal.Password));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -202,5 +202,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
TaskManager.CompleteTask();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CheckIsTwilioEnabled()
|
||||
{
|
||||
var settings = SystemController.GetSystemSettingsActive(SystemSettings.TWILIO_SETTINGS, false);
|
||||
|
||||
return settings != null
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_ACCOUNTSID_KEY, string.Empty))
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_AUTHTOKEN_KEY, string.Empty))
|
||||
&& !string.IsNullOrEmpty(settings.GetValueOrDefault(SystemSettings.TWILIO_PHONEFROM_KEY, string.Empty));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = GetUserInternally(username);
|
||||
UserInfoInternal user = GetUserInternally(username);
|
||||
|
||||
// check if the user exists
|
||||
if (user == null)
|
||||
|
@ -99,7 +99,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
|
||||
// compare user passwords
|
||||
if (user.Password != password)
|
||||
if (CryptoUtils.SHA1(user.Password) != password)
|
||||
{
|
||||
if (lockOut >= 0)
|
||||
DataProvider.UpdateUserFailedLoginAttempt(user.UserId, lockOut, false);
|
||||
|
@ -145,7 +145,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
try
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = GetUserInternally(username);
|
||||
UserInfoInternal user = GetUserInternally(username);
|
||||
|
||||
// check if the user exists
|
||||
if (user == null)
|
||||
|
@ -155,8 +155,8 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
// compare user passwords
|
||||
if (user.Password == password)
|
||||
return user;
|
||||
if (CryptoUtils.SHA1(user.Password) == password)
|
||||
return new UserInfo(user);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
items["Email"] = true;
|
||||
|
||||
// get reseller details
|
||||
UserInfo reseller = UserController.GetUser(user.OwnerId);
|
||||
UserInfoInternal reseller = UserController.GetUser(user.OwnerId);
|
||||
if (reseller != null)
|
||||
{
|
||||
reseller.Password = "";
|
||||
|
@ -264,10 +264,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
}
|
||||
|
||||
internal static UserInfo GetUserInternally(int userId)
|
||||
internal static UserInfoInternal GetUserInternally(int userId)
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
|
||||
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
|
||||
DataProvider.GetUserByIdInternally(userId));
|
||||
|
||||
if (user != null)
|
||||
|
@ -275,10 +275,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return user;
|
||||
}
|
||||
|
||||
internal static UserInfo GetUserInternally(string username)
|
||||
internal static UserInfoInternal GetUserInternally(string username)
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
|
||||
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
|
||||
DataProvider.GetUserByUsernameInternally(username));
|
||||
|
||||
if (user != null)
|
||||
|
@ -288,10 +288,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return user;
|
||||
}
|
||||
|
||||
public static UserInfo GetUser(int userId)
|
||||
public static UserInfoInternal GetUser(int userId)
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
|
||||
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
|
||||
DataProvider.GetUserById(SecurityContext.User.UserId, userId));
|
||||
|
||||
if (user != null)
|
||||
|
@ -299,10 +299,10 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return user;
|
||||
}
|
||||
|
||||
public static UserInfo GetUser(string username)
|
||||
public static UserInfoInternal GetUser(string username)
|
||||
{
|
||||
// try to get user from database
|
||||
UserInfo user = ObjectUtils.FillObjectFromDataReader<UserInfo>(
|
||||
UserInfoInternal user = ObjectUtils.FillObjectFromDataReader<UserInfoInternal>(
|
||||
DataProvider.GetUserByUsername(SecurityContext.User.UserId, username));
|
||||
|
||||
if (user != null)
|
||||
|
@ -381,7 +381,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return DataProvider.GetUsers(SecurityContext.User.UserId, ownerId, recursive);
|
||||
}
|
||||
|
||||
public static int AddUser(UserInfo user, bool sendLetter)
|
||||
public static int AddUser(UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
// check account
|
||||
int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo);
|
||||
|
@ -424,7 +424,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
user.IsPeer,
|
||||
user.Comments,
|
||||
user.Username.Trim(),
|
||||
CryptoUtils.Encrypt(user.Password),
|
||||
CryptoUtils.Encrypt(password),
|
||||
user.FirstName,
|
||||
user.LastName,
|
||||
user.Email,
|
||||
|
|
|
@ -119,11 +119,11 @@ namespace WebsitePanel.EnterpriseServer
|
|||
user.Email = email;
|
||||
user.SecondaryEmail = secondaryEmail;
|
||||
user.Username = username;
|
||||
user.Password = password;
|
||||
// user.Password = password;
|
||||
user.HtmlMail = htmlMail;
|
||||
|
||||
// add a new user
|
||||
createdUserId = UserController.AddUser(user, false);
|
||||
createdUserId = UserController.AddUser(user, false, password);
|
||||
if (createdUserId < 0)
|
||||
{
|
||||
// exit
|
||||
|
|
|
@ -211,6 +211,18 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public ResultObject SendUserPasswordRequestSms(int itemId, int accountId, string reason, string phoneTo)
|
||||
{
|
||||
return OrganizationController.SendUserPasswordRequestSms(itemId, accountId, reason, phoneTo);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public void SendUserPasswordRequestEmail(int itemId, int accountId, string reason, string mailTo, bool finalStep)
|
||||
{
|
||||
OrganizationController.SendUserPasswordRequestEmail(itemId, accountId, reason, mailTo, finalStep);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Domains
|
||||
|
|
|
@ -59,6 +59,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return SystemController.GetSystemSettingsActive(settingsName, decrypt);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public bool CheckIsTwilioEnabled()
|
||||
{
|
||||
return SystemController.CheckIsTwilioEnabled();
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public int SetSystemSettings(string settingsName, SystemSettings settings)
|
||||
{
|
||||
|
|
|
@ -57,13 +57,15 @@ namespace WebsitePanel.EnterpriseServer
|
|||
[WebMethod]
|
||||
public UserInfo GetUserById(int userId)
|
||||
{
|
||||
return UserController.GetUser(userId);
|
||||
UserInfoInternal uinfo = UserController.GetUser(userId);
|
||||
return (uinfo != null) ? new UserInfo(uinfo) : null;
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public UserInfo GetUserByUsername(string username)
|
||||
{
|
||||
return UserController.GetUser(username);
|
||||
UserInfoInternal uinfo = UserController.GetUser(username);
|
||||
return (uinfo != null) ? new UserInfo(uinfo) : null;
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
@ -136,9 +138,9 @@ namespace WebsitePanel.EnterpriseServer
|
|||
}
|
||||
|
||||
[WebMethod]
|
||||
public int AddUser(UserInfo user, bool sendLetter)
|
||||
public int AddUser(UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
return UserController.AddUser(user, sendLetter);
|
||||
return UserController.AddUser(user, sendLetter, password);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
@ -175,7 +177,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
user.IsPeer = isPeer;
|
||||
user.IsDemo = isDemo;
|
||||
user.Username = username;
|
||||
user.Password = password;
|
||||
// user.Password = password;
|
||||
user.FirstName = firstName;
|
||||
user.LastName = lastName;
|
||||
user.Email = email;
|
||||
|
@ -192,7 +194,7 @@ namespace WebsitePanel.EnterpriseServer
|
|||
user.HtmlMail = htmlMail;
|
||||
user.CompanyName = companyName;
|
||||
user.EcommerceEnabled = ecommerceEnabled;
|
||||
return UserController.AddUser(user, sendLetter);
|
||||
return UserController.AddUser(user, sendLetter, password);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
|
|
|
@ -4479,7 +4479,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
{
|
||||
ExchangeLog.LogStart("CheckOrganizationPublicFolderMailbox");
|
||||
|
||||
Collection<PSObject> result = GetPublicFolderMailbox(runSpace, orgCanonicalName, GetPublicFolderMailboxName(organizationId));
|
||||
Collection<PSObject> result = GetPublicFolderMailbox(runSpace, orgCanonicalName, GetPublicFolderMailboxName(organizationId), true);
|
||||
if (result == null || result.Count == 0)
|
||||
{
|
||||
ExchangeTransaction transaction = StartTransaction();
|
||||
|
@ -4501,7 +4501,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
{
|
||||
ExchangeLog.LogStart("CheckOrganizationRootFolder");
|
||||
|
||||
Collection<PSObject> result = GetPublicFolderObject(runSpace, orgCanonicalName+"/"+GetPublicFolderMailboxName(organizationId), "\\" + folder);
|
||||
Collection<PSObject> result = GetPublicFolderObject(runSpace, orgCanonicalName+"/"+GetPublicFolderMailboxName(organizationId), "\\" + folder, true);
|
||||
if (result == null || result.Count == 0)
|
||||
{
|
||||
ExchangeTransaction transaction = StartTransaction();
|
||||
|
@ -4617,22 +4617,22 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
ExchangeLog.LogEnd("DeletePublicFolderInternal");
|
||||
}
|
||||
|
||||
private Collection<PSObject> GetPublicFolderObject(Runspace runSpace, string mailbox, string id)
|
||||
private Collection<PSObject> GetPublicFolderObject(Runspace runSpace, string mailbox, string id, bool checkExist = false)
|
||||
{
|
||||
Command cmd = new Command("Get-PublicFolder");
|
||||
cmd.Parameters.Add("Identity", id);
|
||||
//cmd.Parameters.Add("Mailbox", mailbox);
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, true, !checkExist);
|
||||
return result;
|
||||
}
|
||||
|
||||
private Collection<PSObject> GetPublicFolderMailbox(Runspace runSpace, string organizationDistinguishedName, string name)
|
||||
private Collection<PSObject> GetPublicFolderMailbox(Runspace runSpace, string organizationDistinguishedName, string name, bool checkExist)
|
||||
{
|
||||
Command cmd = new Command("Get-Mailbox");
|
||||
cmd.Parameters.Add("Identity", name);
|
||||
cmd.Parameters.Add("PublicFolder");
|
||||
cmd.Parameters.Add("OrganizationalUnit", organizationDistinguishedName);
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd);
|
||||
Collection<PSObject> result = ExecuteShellCommand(runSpace, cmd, true, !checkExist);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -5369,7 +5369,7 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
string resultObjectDN = null;
|
||||
Command cmd = new Command("Get-AddressList");
|
||||
cmd.Parameters.Add("Identity", id);
|
||||
Collection<PSObject> result = this.ExecuteShellCommand(runSpace, cmd);
|
||||
Collection<PSObject> result = this.ExecuteShellCommand(runSpace, cmd, true, false);
|
||||
if ((result != null) && (result.Count > 0))
|
||||
{
|
||||
resultObjectDN = this.GetResultObjectDN(result);
|
||||
|
@ -6242,13 +6242,19 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd)
|
||||
{
|
||||
return ExecuteShellCommand(runSpace, cmd, true);
|
||||
return ExecuteShellCommand(runSpace, cmd, true, true);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController)
|
||||
{
|
||||
object[] errors;
|
||||
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors);
|
||||
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors, true);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, bool writeErrorExchangeLog)
|
||||
{
|
||||
object[] errors;
|
||||
return ExecuteShellCommand(runSpace, cmd, useDomainController, out errors, writeErrorExchangeLog);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, ResultObject res)
|
||||
|
@ -6272,10 +6278,10 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, out object[] errors)
|
||||
{
|
||||
return ExecuteShellCommand(runSpace, cmd, true, out errors);
|
||||
return ExecuteShellCommand(runSpace, cmd, true, out errors, true);
|
||||
}
|
||||
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors)
|
||||
internal Collection<PSObject> ExecuteShellCommand(Runspace runSpace, Command cmd, bool useDomainController, out object[] errors, bool writeErrorExchangeLog)
|
||||
{
|
||||
ExchangeLog.LogStart("ExecuteShellCommand");
|
||||
List<object> errorList = new List<object>();
|
||||
|
@ -6309,8 +6315,12 @@ namespace WebsitePanel.Providers.HostedSolution
|
|||
foreach (object item in pipeLine.Error.ReadToEnd())
|
||||
{
|
||||
errorList.Add(item);
|
||||
string errorMessage = string.Format("Invoke error: {0}", item);
|
||||
ExchangeLog.LogWarning(errorMessage);
|
||||
|
||||
if (writeErrorExchangeLog)
|
||||
{
|
||||
string errorMessage = string.Format("Invoke error: {0}", item);
|
||||
ExchangeLog.LogWarning(errorMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 6.1 KiB |
|
@ -455,4 +455,76 @@ div#breadcrumb_wrapper a:last-child {
|
|||
.navbar-right {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-color: #F4F4F4;
|
||||
border-color: #d4d4d4;
|
||||
background: rgb(251,251,251);
|
||||
background: -moz-linear-gradient(top, rgba(251,251,251,1) 0%, rgba(242,242,242,1) 100%);
|
||||
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(251,251,251,1)), color-stop(100%,rgba(242,242,242,1)));
|
||||
background: -webkit-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
|
||||
background: -o-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
|
||||
background: -ms-linear-gradient(top, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
|
||||
background: linear-gradient(to bottom, rgba(251,251,251,1) 0%,rgba(242,242,242,1) 100%);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fbfbfb', endColorstr='#f2f2f2',GradientType=0 );
|
||||
-webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
|
||||
-moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
|
||||
box-shadow: 0 1px 10px rgba(0,0,0,.1);
|
||||
}
|
||||
.navbar-inverse .navbar-text, .navbar-inverse .navbar-brand, .navbar-text, #logout {
|
||||
color: #565656;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand:hover, .navbar-inverse .navbar-brand:focus, .navbar-text:hover, #logout:hover {
|
||||
color: #565656;
|
||||
background-color: transparent;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div#breadcrumb_wrapper {
|
||||
background-color: #F7F7F7;
|
||||
border: 1px solid #d4d4d4;
|
||||
margin-top: 9px;
|
||||
}
|
||||
.progress {
|
||||
height:21px;
|
||||
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #BBBBBB;
|
||||
border-radius: 3px!important;
|
||||
}
|
||||
.progress-bar {
|
||||
background-color: #F4C18F;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
body {
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
p.progress-text {
|
||||
position: absolute;
|
||||
left: 44%;
|
||||
color: #515151;
|
||||
}
|
||||
p.resource-subtext {
|
||||
color: #AEAEAE;
|
||||
}
|
||||
#logout :hover {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.file-link:hover {
|
||||
text-decoration:none;
|
||||
}
|
||||
.file-link p {
|
||||
color: #818181;
|
||||
font-size: 13pt;
|
||||
}
|
||||
.file-link p:hover {
|
||||
color: #333!important;
|
||||
}
|
||||
.icon-size {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
|
@ -88,11 +88,11 @@ namespace WebsitePanel.WebDavPortal.Resources {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Address Inforamtion.
|
||||
/// Looks up a localized string similar to Address Information.
|
||||
/// </summary>
|
||||
public static string AddressInforamtion {
|
||||
public static string AddressInformation {
|
||||
get {
|
||||
return ResourceManager.GetString("AddressInforamtion", resourceCulture);
|
||||
return ResourceManager.GetString("AddressInformation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@
|
|||
<data name="Address" xml:space="preserve">
|
||||
<value>Address</value>
|
||||
</data>
|
||||
<data name="AddressInforamtion" xml:space="preserve">
|
||||
<value>Address Inforamtion</value>
|
||||
<data name="AddressInformation" xml:space="preserve">
|
||||
<value>Address Information</value>
|
||||
</data>
|
||||
<data name="Back" xml:space="preserve">
|
||||
<value>Back</value>
|
||||
|
|
|
@ -169,7 +169,7 @@
|
|||
<div class="panel-heading" role="tab" id="heading-address-information">
|
||||
<h4 class="panel-title">
|
||||
<a class="collapsed" data-toggle="collapse" href="#address-information" aria-expanded="false" aria-controls="address-information">
|
||||
@UI.AddressInforamtion
|
||||
@UI.AddressInformation
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<p class="progress-text">@percent%</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>@ViewDataHelper.BytesToSize(resource.ContentLength) / @ViewDataHelper.BytesToSize(resource.AllocatedSpace)</p>
|
||||
<p class="resource-subtext">@ViewDataHelper.BytesToSize(resource.ContentLength) / @ViewDataHelper.BytesToSize(resource.AllocatedSpace)</p>
|
||||
}
|
||||
|
||||
<div class="selected-element-overlay">
|
||||
|
|
|
@ -43,6 +43,7 @@ using System.Web.Security;
|
|||
using System.Web.UI.WebControls;
|
||||
using System.Net;
|
||||
using System.Net.Mail;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using Microsoft.Web.Services3;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
|
@ -336,15 +337,30 @@ namespace WebsitePanel.Portal
|
|||
return DefaultPage.GetLocalizedPageName(pageId);
|
||||
}
|
||||
|
||||
public static string SHA1(string plainText)
|
||||
{
|
||||
// Convert plain text into a byte array.
|
||||
byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||
|
||||
HashAlgorithm hash = new SHA1Managed(); ;
|
||||
|
||||
// Compute hash value of our plain text with appended salt.
|
||||
byte[] hashBytes = hash.ComputeHash(plainTextBytes);
|
||||
|
||||
// Return the result.
|
||||
return Convert.ToBase64String(hashBytes);
|
||||
}
|
||||
public static int AuthenticateUser(string username, string password, string ipAddress,
|
||||
bool rememberLogin, string preferredLocale, string theme)
|
||||
{
|
||||
esAuthentication authService = new esAuthentication();
|
||||
ConfigureEnterpriseServerProxy(authService, false);
|
||||
|
||||
string passwordSH = SHA1(password);
|
||||
|
||||
try
|
||||
{
|
||||
int authResult = authService.AuthenticateUser(username, password, ipAddress);
|
||||
int authResult = authService.AuthenticateUser(username, passwordSH, ipAddress);
|
||||
|
||||
if (authResult < 0)
|
||||
{
|
||||
|
@ -352,13 +368,13 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
else
|
||||
{
|
||||
UserInfo user = authService.GetUserByUsernamePassword(username, password, ipAddress);
|
||||
UserInfo user = authService.GetUserByUsernamePassword(username, passwordSH, ipAddress);
|
||||
if (user != null)
|
||||
{
|
||||
if (IsRoleAllowedToLogin(user.Role))
|
||||
{
|
||||
// issue authentication ticket
|
||||
FormsAuthenticationTicket ticket = CreateAuthTicket(user.Username, user.Password, user.Role, rememberLogin);
|
||||
FormsAuthenticationTicket ticket = CreateAuthTicket(user.Username, password, user.Role, rememberLogin);
|
||||
SetAuthTicket(ticket, rememberLogin);
|
||||
|
||||
CompleteUserLogin(username, rememberLogin, preferredLocale, theme);
|
||||
|
@ -513,7 +529,7 @@ namespace WebsitePanel.Portal
|
|||
}
|
||||
}
|
||||
|
||||
public static int AddUserAccount(List<string> log, UserInfo user, bool sendLetter)
|
||||
public static int AddUserAccount(List<string> log, UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
esUsers usersService = new esUsers();
|
||||
ConfigureEnterpriseServerProxy(usersService, true);
|
||||
|
@ -521,7 +537,7 @@ namespace WebsitePanel.Portal
|
|||
try
|
||||
{
|
||||
// add user to WebsitePanel server
|
||||
return usersService.AddUser(user, sendLetter);
|
||||
return usersService.AddUser(user, sendLetter, password);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,162 @@
|
|||
<?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>
|
||||
<data name="lblSmsBody.Text" xml:space="preserve">
|
||||
<value>SMS</value>
|
||||
</data>
|
||||
</root>
|
|
@ -172,7 +172,7 @@
|
|||
<value>Webdav Portal URL</value>
|
||||
</data>
|
||||
<data name="WebdavPortalSettings.Text" xml:space="preserve">
|
||||
<value>Webdav Portal</value>
|
||||
<value>Organization Password Reset Module</value>
|
||||
</data>
|
||||
<data name="chkEnablePasswordReset.Text" xml:space="preserve">
|
||||
<value>Yes</value>
|
||||
|
|
|
@ -159,4 +159,7 @@
|
|||
<data name="lnkOrganizationUserPasswordResetPincodeLetter.Text" xml:space="preserve">
|
||||
<value>Organization User Password Reset Pincode Letter</value>
|
||||
</data>
|
||||
<data name="lnkOrganizationUserPasswordRequestLetter.Text" xml:space="preserve">
|
||||
<value>Organization User Password Request Letter</value>
|
||||
</data>
|
||||
</root>
|
|
@ -210,10 +210,10 @@ namespace WebsitePanel.Portal
|
|||
return dsUsers;
|
||||
}
|
||||
|
||||
public static int AddUser(List<string> log, int portalId, UserInfo user, bool sendLetter)
|
||||
public static int AddUser(List<string> log, int portalId, UserInfo user, bool sendLetter, string password)
|
||||
{
|
||||
// add user to WebsitePanel server
|
||||
return ES.Services.Users.AddUser(user, sendLetter);
|
||||
return ES.Services.Users.AddUser(user, sendLetter, password);
|
||||
}
|
||||
|
||||
public static void AddUserVLan(int userId, UserVlan vLan)
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/MailboxPlanSelector.ascx" TagName="MailboxPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
|
@ -105,12 +106,17 @@
|
|||
</wsp:EmailAddress>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="PasswordBlock"></wsp:SendToControl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="PasswordBlock" runat="server" Visible="false">
|
||||
<td class="FormLabel150" valign="top"><asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true">
|
||||
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="false">
|
||||
</wsp:PasswordControl>
|
||||
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
|
||||
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" Visible="False"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.Security;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
@ -161,12 +162,19 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
|
||||
string subscriberNumber = IsNewUser ? txtSubscriberNumber.Text.Trim() : userSelector.GetSubscriberNumber();
|
||||
|
||||
var passwordString = password.Password;
|
||||
|
||||
if (sendToControl.IsRequestSend && IsNewUser)
|
||||
{
|
||||
passwordString = Membership.GeneratePassword(16, 3);
|
||||
}
|
||||
|
||||
accountId = ES.Services.ExchangeServer.CreateMailbox(PanelRequest.ItemID, accountId, type,
|
||||
accountName,
|
||||
displayName,
|
||||
name,
|
||||
domain,
|
||||
password.Password,
|
||||
passwordString,
|
||||
chkSendInstructions.Checked,
|
||||
sendInstructionEmail.Text,
|
||||
Convert.ToInt32(mailboxPlanSelector.MailboxPlanId),
|
||||
|
@ -187,6 +195,15 @@ namespace WebsitePanel.Portal.ExchangeServer
|
|||
}
|
||||
}
|
||||
|
||||
if (sendToControl.SendEmail && IsNewUser)
|
||||
{
|
||||
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
|
||||
}
|
||||
else if (sendToControl.SendMobile && IsNewUser)
|
||||
{
|
||||
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
|
||||
}
|
||||
|
||||
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "mailbox_settings",
|
||||
"SpaceID=" + PanelSecurity.PackageId.ToString(),
|
||||
"ItemID=" + PanelRequest.ItemID.ToString()));
|
||||
|
|
|
@ -228,6 +228,24 @@ namespace WebsitePanel.Portal.ExchangeServer {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.EmailAddress email;
|
||||
|
||||
/// <summary>
|
||||
/// sendToControl control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
|
||||
|
||||
/// <summary>
|
||||
/// PasswordBlock control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow PasswordBlock;
|
||||
|
||||
/// <summary>
|
||||
/// locPassword control.
|
||||
/// </summary>
|
||||
|
|
|
@ -5,106 +5,122 @@
|
|||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EmailControl.ascx" TagName="EmailControl" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/SendToControl.ascx" TagName="SendToControl" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
||||
<div runat="server" id="divWrapper">
|
||||
<script language="javascript" type="text/javascript">
|
||||
function buildDisplayName() {
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = '';
|
||||
<script language="javascript" type="text/javascript">
|
||||
function buildDisplayName() {
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = '';
|
||||
|
||||
if (document.getElementById("<%= txtFirstName.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' ';
|
||||
if (document.getElementById("<%= txtFirstName.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtFirstName.ClientID %>").value + ' ';
|
||||
|
||||
if (document.getElementById("<%= txtInitials.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' ';
|
||||
if (document.getElementById("<%= txtInitials.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtInitials.ClientID %>").value + ' ';
|
||||
|
||||
if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
|
||||
}
|
||||
</script>
|
||||
if (document.getElementById("<%= txtLastName.ClientID %>").value != '')
|
||||
document.getElementById("<%= txtDisplayName.ClientID %>").value = document.getElementById("<%= txtDisplayName.ClientID %>").value + document.getElementById("<%= txtLastName.ClientID %>").value;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div id="ExchangeContainer">
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize>
|
||||
</div>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();" ></asp:TextBox>
|
||||
|
||||
<div class="Module">
|
||||
<div class="Left">
|
||||
</div>
|
||||
<div class="Content">
|
||||
<div class="Center">
|
||||
<div class="Title">
|
||||
<asp:Image ID="Image1" SkinID="OrganizationUserAdd48" runat="server" />
|
||||
<asp:Localize ID="locTitle" runat="server" meta:resourcekey="locTitle" Text="Create User"></asp:Localize>
|
||||
</div>
|
||||
<asp:UpdatePanel ID="CreateUserUpdatePanel" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="FormBody">
|
||||
<wsp:SimpleMessageBox id="messageBox" runat="server" />
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locFirstName" runat="server" meta:resourcekey="locFirstName" Text="First Name: "></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtFirstName" runat="server" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
|
||||
|
||||
<asp:Localize ID="locInitials" runat="server" meta:resourcekey="locInitials" Text="Initials:" />
|
||||
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
|
||||
ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber"
|
||||
ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox">
|
||||
</wsp:EmailAddress>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150" valign="top"><asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="true" >
|
||||
</wsp:PasswordControl>
|
||||
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
<asp:TextBox ID="txtInitials" runat="server" MaxLength="6" CssClass="TextBox100" onKeyUp="buildDisplayName();"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locLastName" runat="server" meta:resourcekey="locLastName" Text="Last Name: "></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtLastName" runat="server" CssClass="TextBox200" onKeyUp="buildDisplayName();"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locDisplayName" runat="server" meta:resourcekey="locDisplayName" Text="Display Name: *"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtDisplayName" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireDisplayName" runat="server" meta:resourcekey="valRequireDisplayName" ControlToValidate="txtDisplayName"
|
||||
ErrorMessage="Enter Display Name" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locSubscriberNumber" runat="server" meta:resourcekey="locSubscriberNumber" Text="Account Number: *"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtSubscriberNumber" runat="server" CssClass="HugeTextBox200"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="valRequireSubscriberNumber" runat="server" meta:resourcekey="valRequireSubscriberNumber" ControlToValidate="txtSubscriberNumber"
|
||||
ErrorMessage="Enter Account Number" ValidationGroup="CreateMailbox" Display="Dynamic" Text="*" SetFocusOnError="True"></asp:RequiredFieldValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locAccount" runat="server" meta:resourcekey="locAccount" Text="E-mail Address: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:EmailAddress id="email" runat="server" ValidationGroup="CreateMailbox">
|
||||
</wsp:EmailAddress>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<wsp:SendToControl id="sendToControl" runat="server" ValidationGroup="CreateMailbox" ControlToHide="PasswordBlock"></wsp:SendToControl>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="PasswordBlock" runat="server" Visible="false">
|
||||
<td class="FormLabel150" valign="top">
|
||||
<asp:Localize ID="locPassword" runat="server" meta:resourcekey="locPassword" Text="Password: *"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:PasswordControl id="password" runat="server" ValidationGroup="CreateMailbox" AllowGeneratePassword="false">
|
||||
</wsp:PasswordControl>
|
||||
<asp:CheckBox ID="chkUserMustChangePassword" runat="server" meta:resourcekey="chkUserMustChangePassword" Text="User must change password at next login" Visible="False"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
|
||||
</td>
|
||||
<td><wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnCreate" runat="server" Text="Create Mailbox"
|
||||
CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
|
||||
OnClick="btnCreate_Click"
|
||||
OnClientClick="ShowProgressDialog('Creating mailbox...');"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:CheckBox ID="chkSendInstructions" runat="server" meta:resourcekey="chkSendInstructions" Text="Send Setup Instructions" Checked="true" />
|
||||
</td>
|
||||
<td>
|
||||
<wsp:EmailControl id="sendInstructionEmail" runat="server" RequiredEnabled="true" ValidationGroup="CreateMailbox"></wsp:EmailControl></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button ID="btnCreate" runat="server" Text="Create Mailbox"
|
||||
CssClass="Button1" meta:resourcekey="btnCreate" ValidationGroup="CreateMailbox"
|
||||
OnClick="btnCreate_Click"
|
||||
OnClientClick="ShowProgressDialog('Creating user...');"></asp:Button>
|
||||
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True" ShowSummary="False" ValidationGroup="CreateMailbox" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
using System;
|
||||
using System.Web.Security;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
|
@ -98,10 +99,17 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
|
||||
try
|
||||
{
|
||||
var passwordString = password.Password;
|
||||
|
||||
if (sendToControl.IsRequestSend)
|
||||
{
|
||||
passwordString = Membership.GeneratePassword(16, 3);
|
||||
}
|
||||
|
||||
int accountId = ES.Services.Organizations.CreateUser(PanelRequest.ItemID, txtDisplayName.Text.Trim(),
|
||||
email.AccountName.ToLower(),
|
||||
email.DomainName.ToLower(),
|
||||
password.Password,
|
||||
passwordString,
|
||||
txtSubscriberNumber.Text.Trim(),
|
||||
chkSendInstructions.Checked,
|
||||
sendInstructionEmail.Text);
|
||||
|
@ -119,6 +127,15 @@ namespace WebsitePanel.Portal.HostedSolution
|
|||
}
|
||||
}
|
||||
|
||||
if (sendToControl.SendEmail)
|
||||
{
|
||||
ES.Services.Organizations.SendUserPasswordRequestEmail(PanelRequest.ItemID, accountId, "User creation", sendToControl.Email, true);
|
||||
}
|
||||
else if (sendToControl.SendMobile)
|
||||
{
|
||||
ES.Services.Organizations.SendUserPasswordRequestSms(PanelRequest.ItemID, accountId, "User creation", sendToControl.Mobile);
|
||||
}
|
||||
|
||||
Response.Redirect(EditUrl("AccountID", accountId.ToString(), "edit_user",
|
||||
"SpaceID=" + PanelSecurity.PackageId,
|
||||
"ItemID=" + PanelRequest.ItemID,
|
||||
|
|
|
@ -48,6 +48,15 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize locTitle;
|
||||
|
||||
/// <summary>
|
||||
/// CreateUserUpdatePanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.UpdatePanel CreateUserUpdatePanel;
|
||||
|
||||
/// <summary>
|
||||
/// messageBox control.
|
||||
/// </summary>
|
||||
|
@ -183,6 +192,24 @@ namespace WebsitePanel.Portal.HostedSolution {
|
|||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.ExchangeServer.UserControls.EmailAddress email;
|
||||
|
||||
/// <summary>
|
||||
/// sendToControl control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.UserControls.SendToControl sendToControl;
|
||||
|
||||
/// <summary>
|
||||
/// PasswordBlock control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow PasswordBlock;
|
||||
|
||||
/// <summary>
|
||||
/// locPassword control.
|
||||
/// </summary>
|
||||
|
|
|
@ -195,7 +195,7 @@ namespace WebsitePanel.Portal
|
|||
user.SecondaryEmail = txtSecondaryEmail.Text;
|
||||
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
|
||||
user.Username = txtUsername.Text;
|
||||
user.Password = userPassword.Password;
|
||||
// user.Password = userPassword.Password;
|
||||
user.IsDemo = chkDemo.Checked;
|
||||
|
||||
user.LoginStatusId = loginStatus.SelectedIndex;
|
||||
|
@ -220,7 +220,7 @@ namespace WebsitePanel.Portal
|
|||
try
|
||||
{
|
||||
//int userId = UsersHelper.AddUser(log, PortalId, user);
|
||||
int userId = PortalUtils.AddUserAccount(log, user, false);
|
||||
int userId = PortalUtils.AddUserAccount(log, user, false, userPassword.Password);
|
||||
|
||||
if (userId < 0)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordRequestLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordRequestLetter" %>
|
||||
|
||||
|
||||
|
||||
|
||||
<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="lblSmsBody" runat="server" meta:resourcekey="lblSmsBody" Text="SMS Body:"></asp:Label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="Normal" colspan="2">
|
||||
<asp:TextBox ID="txtSmsBody" runat="server" Rows="15" TextMode="MultiLine" Width="680px" CssClass="NormalTextBox" Wrap="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
|
@ -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 SettingsUserPasswordRequestLetter : 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"];
|
||||
|
||||
txtSmsBody.Text = settings["SMSBody"];
|
||||
}
|
||||
|
||||
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["SMSBody"] = txtSmsBody.Text;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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 SettingsUserPasswordRequestLetter {
|
||||
|
||||
/// <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>
|
||||
/// lblSmsBody 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 lblSmsBody;
|
||||
|
||||
/// <summary>
|
||||
/// txtSmsBody 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 txtSmsBody;
|
||||
}
|
||||
}
|
|
@ -54,6 +54,10 @@
|
|||
<asp:HyperLink ID="lnkOrganizationUserPasswordResetPincodeLetter" runat="server" meta:resourcekey="lnkOrganizationUserPasswordResetPincodeLetter"
|
||||
Text="User Password Reset Pincode Letter" NavigateUrl='<%# GetSettingsLink("UserPasswordResetPincodeLetter", "SettingsUserPasswordResetPincodeLetter") %>'></asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HyperLink3" runat="server" meta:resourcekey="lnkOrganizationUserPasswordRequestLetter"
|
||||
Text="Organization User Password Request Letter" NavigateUrl='<%# GetSettingsLink("OrganizationUserPasswordRequestLetter", "SettingsUserPasswordRequestLetter") %>'></asp:HyperLink>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="FormFooter">
|
||||
|
|
|
@ -129,6 +129,15 @@ namespace WebsitePanel.Portal {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.HyperLink lnkOrganizationUserPasswordResetPincodeLetter;
|
||||
|
||||
/// <summary>
|
||||
/// HyperLink3 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 HyperLink3;
|
||||
|
||||
/// <summary>
|
||||
/// btnCancel control.
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,150 @@
|
|||
<?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="btnResetPassoword.Text" xml:space="preserve">
|
||||
<value>Send Password Reset Email</value>
|
||||
</data>
|
||||
<data name="chkSaveAsMobile.Text" xml:space="preserve">
|
||||
<value>Save as user mobile</value>
|
||||
</data>
|
||||
<data name="locEmailAddress.Text" xml:space="preserve">
|
||||
<value>Email: *</value>
|
||||
</data>
|
||||
<data name="locMobile.Text" xml:space="preserve">
|
||||
<value>Mobile: *</value>
|
||||
</data>
|
||||
<data name="locReason.Text" xml:space="preserve">
|
||||
<value>Reason:</value>
|
||||
</data>
|
||||
<data name="locSendTo.Text" xml:space="preserve">
|
||||
<value>Send to:</value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Reset Password</value>
|
||||
</data>
|
||||
<data name="rbtnEmail.Text" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="rbtnMobile.Text" xml:space="preserve">
|
||||
<value>Mobile</value>
|
||||
</data>
|
||||
<data name="chkSendPasswordResetEmail.Text" xml:space="preserve">
|
||||
<value>Send Password Request</value>
|
||||
</data>
|
||||
</root>
|
|
@ -0,0 +1,52 @@
|
|||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SendToControl.ascx.cs" Inherits="WebsitePanel.Portal.UserControls.SendToControl" %>
|
||||
|
||||
|
||||
<table id="send-to-table">
|
||||
<tr>
|
||||
<td class="FormLabel150"></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="chkSendPasswordResetEmail" runat="server" meta:resourcekey="chkSendPasswordResetEmail" Text="Send Password Request" AutoPostBack="true" Checked="True" OnCheckedChanged="chkSendPasswordResetEmail_StateChanged" />
|
||||
</td>
|
||||
</tr>
|
||||
<tbody id="SendToBody" runat="server" visible="False">
|
||||
<tr>
|
||||
<td class="FormLabel150">
|
||||
<asp:Localize ID="locSendTo" runat="server" meta:resourcekey="locSendTo" Text="Send to:"></asp:Localize></td>
|
||||
<td class="FormRBtnL">
|
||||
<asp:RadioButton ID="rbtnEmail" runat="server" meta:resourcekey="rbtnEmail" Text="Email" GroupName="SendToGroup" AutoPostBack="true" Checked="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||
<asp:RadioButton ID="rbtnMobile" runat="server" meta:resourcekey="rbtnMobile" Text="Mobile" GroupName="SendToGroup" AutoPostBack="true" OnCheckedChanged="SendToGroupCheckedChanged" />
|
||||
<br />
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="EmailRow" runat="server">
|
||||
<td class="FormLabel150" valign="top">
|
||||
<asp:Localize ID="locEmailAddress" runat="server" meta:resourcekey="locEmailAddress"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtEmailAddress" CssClass="HugeTextBox200" />
|
||||
<asp:RequiredFieldValidator ID="valEmailAddress" runat="server" ErrorMessage="*" ControlToValidate="txtEmailAddress" ValidationGroup="ResetUserPassword"></asp:RequiredFieldValidator>
|
||||
<asp:RegularExpressionValidator ID="regexEmailValid" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="ResetUserPassword" ControlToValidate="txtEmailAddress" ErrorMessage="Invalid Email Format"></asp:RegularExpressionValidator>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="MobileRow" runat="server" visible="False">
|
||||
<td class="FormLabel150" valign="top">
|
||||
<asp:Localize ID="locMobile" runat="server" meta:resourcekey="locMobile"></asp:Localize></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="txtMobile" CssClass="HugeTextBox200" />
|
||||
<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>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<div runat="server" id="divWrapper">
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#send-to-table input").live("click", function (e) {
|
||||
DisableProgressDialog();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace WebsitePanel.Portal.UserControls
|
||||
{
|
||||
public partial class SendToControl : WebsitePanelControlBase
|
||||
{
|
||||
public string ValidationGroup
|
||||
{
|
||||
get { return valEmailAddress.ValidationGroup; }
|
||||
set
|
||||
{
|
||||
valEmailAddress.ValidationGroup = value;
|
||||
regexEmailValid.ValidationGroup = value;
|
||||
valMobile.ValidationGroup = value;
|
||||
regexMobileValid.ValidationGroup = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsRequestSend
|
||||
{
|
||||
get { return chkSendPasswordResetEmail.Checked; }
|
||||
}
|
||||
|
||||
public bool SendEmail
|
||||
{
|
||||
get { return chkSendPasswordResetEmail.Checked && rbtnEmail.Checked; }
|
||||
}
|
||||
|
||||
public bool SendMobile
|
||||
{
|
||||
get { return chkSendPasswordResetEmail.Checked && rbtnMobile.Checked; }
|
||||
}
|
||||
|
||||
public string Email
|
||||
{
|
||||
get { return txtEmailAddress.Text; }
|
||||
}
|
||||
|
||||
public string Mobile
|
||||
{
|
||||
get { return txtMobile.Text; }
|
||||
}
|
||||
|
||||
public string ControlToHide { get; set; }
|
||||
|
||||
protected void SendToGroupCheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
EmailRow.Visible = rbtnEmail.Checked;
|
||||
MobileRow.Visible = !rbtnEmail.Checked;
|
||||
}
|
||||
|
||||
protected void chkSendPasswordResetEmail_StateChanged(object sender, EventArgs e)
|
||||
{
|
||||
SendToBody.Visible = chkSendPasswordResetEmail.Checked;
|
||||
|
||||
if (!string.IsNullOrEmpty(ControlToHide))
|
||||
{
|
||||
var control = Parent.FindControl(ControlToHide);
|
||||
|
||||
if (control != null)
|
||||
{
|
||||
control.Visible = !chkSendPasswordResetEmail.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
var isTwilioEnabled = ES.Services.System.CheckIsTwilioEnabled();
|
||||
|
||||
rbtnMobile.Visible = isTwilioEnabled;
|
||||
|
||||
if (!Page.IsPostBack)
|
||||
{
|
||||
if (isTwilioEnabled)
|
||||
{
|
||||
rbtnMobile.Checked = true;
|
||||
rbtnEmail.Checked = false;
|
||||
SendToGroupCheckedChanged(null, null);
|
||||
}
|
||||
|
||||
chkSendPasswordResetEmail_StateChanged(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,159 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <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.UserControls {
|
||||
|
||||
|
||||
public partial class SendToControl {
|
||||
|
||||
/// <summary>
|
||||
/// chkSendPasswordResetEmail 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 chkSendPasswordResetEmail;
|
||||
|
||||
/// <summary>
|
||||
/// SendToBody control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl SendToBody;
|
||||
|
||||
/// <summary>
|
||||
/// locSendTo 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 locSendTo;
|
||||
|
||||
/// <summary>
|
||||
/// rbtnEmail 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.RadioButton rbtnEmail;
|
||||
|
||||
/// <summary>
|
||||
/// rbtnMobile 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.RadioButton rbtnMobile;
|
||||
|
||||
/// <summary>
|
||||
/// EmailRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow EmailRow;
|
||||
|
||||
/// <summary>
|
||||
/// locEmailAddress 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 locEmailAddress;
|
||||
|
||||
/// <summary>
|
||||
/// txtEmailAddress 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 txtEmailAddress;
|
||||
|
||||
/// <summary>
|
||||
/// valEmailAddress 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.RequiredFieldValidator valEmailAddress;
|
||||
|
||||
/// <summary>
|
||||
/// regexEmailValid 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.RegularExpressionValidator regexEmailValid;
|
||||
|
||||
/// <summary>
|
||||
/// MobileRow control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTableRow MobileRow;
|
||||
|
||||
/// <summary>
|
||||
/// locMobile 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 locMobile;
|
||||
|
||||
/// <summary>
|
||||
/// txtMobile 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 txtMobile;
|
||||
|
||||
/// <summary>
|
||||
/// valMobile 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.RequiredFieldValidator valMobile;
|
||||
|
||||
/// <summary>
|
||||
/// regexMobileValid 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.RegularExpressionValidator regexMobileValid;
|
||||
|
||||
/// <summary>
|
||||
/// divWrapper control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWrapper;
|
||||
}
|
||||
}
|
|
@ -103,7 +103,7 @@ namespace WebsitePanel.Portal
|
|||
user.SecondaryEmail = txtSecondaryEmail.Text;
|
||||
user.HtmlMail = ddlMailFormat.SelectedIndex == 1;
|
||||
user.Username = txtUsername.Text.Trim();
|
||||
user.Password = userPassword.Password;
|
||||
// user.Password = userPassword.Password;
|
||||
|
||||
// contact info
|
||||
user.CompanyName = contact.CompanyName;
|
||||
|
@ -123,7 +123,7 @@ namespace WebsitePanel.Portal
|
|||
try
|
||||
{
|
||||
//int userId = UsersHelper.AddUser(log, PortalId, user);
|
||||
int userId = PortalUtils.AddUserAccount(log, user, chkAccountLetter.Checked);
|
||||
int userId = PortalUtils.AddUserAccount(log, user, chkAccountLetter.Checked, userPassword.Password);
|
||||
|
||||
if (userId == BusinessErrorCodes.ERROR_INVALID_USER_NAME)
|
||||
{
|
||||
|
|
|
@ -206,23 +206,7 @@ namespace WebsitePanel.Portal
|
|||
{
|
||||
lblSharedIP.Text = string.Format("({0})", ipsGeneral[0].ExternalIP);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] settings = ES.Services.Servers.GetServiceSettings(site.ServiceId);
|
||||
foreach (string setting in settings)
|
||||
{
|
||||
int idx = setting.IndexOf('=');
|
||||
string option = setting.Substring(0, idx);
|
||||
if (String.Compare(option, "publicsharedip", true) == 0)
|
||||
{
|
||||
string res = setting.Substring(idx + 1);
|
||||
if (!String.IsNullOrEmpty(res))
|
||||
lblSharedIP.Text = string.Format("({0})", res);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
lblSharedIP.Visible = !String.IsNullOrEmpty(lblSharedIP.Text);
|
||||
lblSharedIP.Visible = generalIPExists;
|
||||
}
|
||||
|
||||
dedicatedIP.Visible = site.IsDedicatedIP;
|
||||
|
|
|
@ -339,6 +339,20 @@
|
|||
<Compile Include="RDS\RDSImportCollection.ascx.designer.cs">
|
||||
<DependentUpon>RDSImportCollection.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SettingsUserPasswordRequestLetter.ascx.cs">
|
||||
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SettingsUserPasswordRequestLetter.ascx.designer.cs">
|
||||
<DependentUpon>SettingsUserPasswordRequestLetter.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\SendToControl.ascx.cs">
|
||||
<DependentUpon>SendToControl.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UserControls\SendToControl.ascx.designer.cs">
|
||||
<DependentUpon>SendToControl.ascx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="VpsMenu.ascx.cs">
|
||||
<DependentUpon>VpsMenu.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
@ -4909,6 +4923,8 @@
|
|||
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageSettings.ascx" />
|
||||
<Content Include="HostedSharePoint\HostedSharePointEnterpriseStorageUsage.ascx" />
|
||||
<Content Include="RDS\RDSImportCollection.ascx" />
|
||||
<Content Include="SettingsUserPasswordRequestLetter.ascx" />
|
||||
<Content Include="UserControls\SendToControl.ascx" />
|
||||
<Content Include="VpsMenu.ascx" />
|
||||
<Content Include="ProviderControls\HyperV2012R2_Settings.ascx" />
|
||||
<Content Include="SearchObject.ascx" />
|
||||
|
@ -5034,6 +5050,9 @@
|
|||
<Content Include="App_LocalResources\VpsMenu.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="App_LocalResources\SettingsUserPasswordRequestLetter.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<EmbeddedResource Include="RDS\App_LocalResources\RDSEditCollectionSettings.ascx.resx" />
|
||||
<Content Include="RDSServersEditServer.ascx" />
|
||||
<Content Include="RDS\AssignedRDSServers.ascx" />
|
||||
|
@ -5234,6 +5253,7 @@
|
|||
<Content Include="UserControls\App_LocalResources\MailAccountActions.ascx.resx" />
|
||||
<Content Include="ScheduleTaskControls\App_LocalResources\UserPasswordExpirationNotificationView.ascx.resx" />
|
||||
<Content Include="SkinControls\App_LocalResources\SearchObject.ascx.resx" />
|
||||
<Content Include="UserControls\App_LocalResources\SendToControl.ascx.resx" />
|
||||
<EmbeddedResource Include="UserControls\App_LocalResources\WebsiteActions.ascx.resx" />
|
||||
<Content Include="VPS\UserControls\App_LocalResources\Generation.ascx.resx">
|
||||
<SubType>Designer</SubType>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue