From aa59d180e285f95b887e3ffccf8aab670a72ed81 Mon Sep 17 00:00:00 2001
From: vfedosevich
Date: Thu, 2 Apr 2015 04:36:45 -0700
Subject: [PATCH 01/38] password reset scheduler added
---
WebsitePanel/Database/update_db.sql | 145 +-
.../Users/UserSettings.cs | 2 +
.../HostedSolution/OrganizationController.cs | 58 +
.../UserPasswordExpirationNotificationTask.cs | 63 +
.../WebsitePanel.EnterpriseServer.Code.csproj | 1 +
.../HostedSolution/IOrganization.cs | 3 +
.../HostedSolution/OrganizationUser.cs | 2 +
.../OrganizationProvider.cs | 72 +
.../OrganizationProxy.cs | 1927 ++++++++---------
.../WebsitePanel.Server/Organizations.asmx.cs | 7 +
.../ESModule_ControlsHierarchy.config | 1 +
.../App_Data/WebsitePanel_Modules.config | 1 +
.../WebsitePanel_SharedResources.ascx.resx | 6 +-
...ingsUserPasswordExpirationLetter.ascx.resx | 156 ++
.../UserAccountMailTemplateSettings.ascx.resx | 3 +
.../OrganizationUserGeneralSettings.ascx.resx | 3 +
.../OrganizationUserResetPassword.ascx.resx | 132 ++
.../OrganizationUserGeneralSettings.ascx | 2 +
.../OrganizationUserGeneralSettings.ascx.cs | 8 +
...zationUserGeneralSettings.ascx.designer.cs | 9 +
.../OrganizationUserResetPassword.ascx | 45 +
.../OrganizationUserResetPassword.ascx.cs | 43 +
...nizationUserResetPassword.ascx.designer.cs | 114 +
...sswordExpirationNotificationView.ascx.resx | 101 +
...serPasswordExpirationNotificationView.ascx | 13 +
...PasswordExpirationNotificationView.ascx.cs | 43 +
...xpirationNotificationView.ascx.designer.cs | 33 +
.../SettingsUserPasswordExpirationLetter.ascx | 49 +
...ttingsUserPasswordExpirationLetter.ascx.cs | 35 +
...rPasswordExpirationLetter.ascx.designer.cs | 141 ++
.../UserAccountMailTemplateSettings.ascx | 4 +
...countMailTemplateSettings.ascx.designer.cs | 9 +
.../WebsitePanel.Portal.Modules.csproj | 27 +
33 files changed, 2180 insertions(+), 1078 deletions(-)
create mode 100644 WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordExpirationLetter.ascx.resx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.designer.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/App_LocalResources/UserPasswordExpirationNotificationView.ascx.resx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.designer.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.designer.cs
diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index 8829cb8d..910ae546 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -9459,4 +9459,147 @@ BEGIN
(SELECT TOP 1 @item_type_id, @group_id, 'SharePointSiteCollection', TypeName, 100, CalculateDiskSpace, CalculateBandwidth, Suspendable, Disposable, Searchable, Importable, Backupable FROM [dbo].[ServiceItemTypes] WHERE DisplayName = 'SharePointFoundationSiteCollection')
END
-GO
\ No newline at end of file
+GO
+
+
+
+
+
+
+-- USER PASSWORD EXPIRATION NOTIFICATION tasks
+
+IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTasks] WHERE [TaskID] = N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION')
+BEGIN
+INSERT [dbo].[ScheduleTasks] ([TaskID], [TaskType], [RoleID]) VALUES (N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION', N'WebsitePanel.EnterpriseServer.UserPasswordExpirationNotificationTask, WebsitePanel.EnterpriseServer.Code', 1)
+END
+GO
+
+IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskViewConfiguration] WHERE [TaskID] = N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION')
+BEGIN
+INSERT [dbo].[ScheduleTaskViewConfiguration] ([TaskID], [ConfigurationID], [Environment], [Description]) VALUES (N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION', N'ASP_NET', N'ASP.NET', N'~/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx')
+END
+GO
+
+IF NOT EXISTS (SELECT * FROM [dbo].[ScheduleTaskParameters] WHERE [TaskID] = N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION' AND [ParameterID]= N'DAYS_BEFORE_EXPIRATION' )
+BEGIN
+INSERT [dbo].[ScheduleTaskParameters] ([TaskID], [ParameterID], [DataTypeID], [DefaultValue], [ParameterOrder]) VALUES (N'SCHEDULE_TASK_USER_PASSWORD_EXPIRATION_NOTIFICATION', N'DAYS_BEFORE_EXPIRATION', N'String', NULL, 1)
+END
+GO
+
+
+-- USER PASSWORD EXPIRATION EMAIL TEMPLATE
+
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'WebDavPortalResetUrl' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'WebDavPortalResetUrl', N'http://webdav.virtuworks.net/')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'From' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'From', N'support@HostingCompany.com')
+END
+GO
+
+DECLARE @UserPasswordExpirationLetterHtmlBody nvarchar(2500)
+
+Set @UserPasswordExpirationLetterHtmlBody = N'
+
+ Password expiration notification
+
+
+
+
+
+
Password expiration notification
+
+
+
+Hello #user.FirstName#,
+
+
+
+
+Your password will expire at #user.PasswordExpirationDateTime#. You can reset your own password by visiting the following page:
+
+
+
#passwordResetLink#
+
+
+
+If you have any questions regarding your hosting account, feel free to contact our support department at any time.
+
+
+
+Best regards
+
+
+';
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'HtmlBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'HtmlBody', @UserPasswordExpirationLetterHtmlBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'HtmlBody'
+GO
+
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'Priority' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'Priority', N'Normal')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'Subject' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'Subject', N'Password expiration notification')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'LogoUrl' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
+END
+GO
+
+
+DECLARE @UserPasswordExpirationLetterTextBody nvarchar(2500)
+
+Set @UserPasswordExpirationLetterTextBody = N'=========================================
+ Password expiration notification
+=========================================
+
+
+Hello #user.FirstName#,
+
+
+Your password will expire at #user.PasswordExpirationDateTime#. You can reset your own password by visiting the following page:
+
+#passwordResetLink#
+
+If you have any questions regarding your hosting account, feel free to contact our support department at any time.
+
+Best regards'
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'TextBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordExpirationLetter', N'TextBody', @UserPasswordExpirationLetterTextBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordExpirationLetter' AND [PropertyName]= N'TextBody'
+GO
+
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
index 251d5dbf..6740094f 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
@@ -65,6 +65,8 @@ namespace WebsitePanel.EnterpriseServer
public const string DEFAULT_LYNCUSERPLANS = "DefaultLyncUserPlans";
public const string RDS_SETUP_LETTER = "RDSSetupLetter";
public const string RDS_POLICY = "RdsPolicy";
+ public const string USER_PASSWORD_EXPIRATION_LETTER = "UserPasswordExpirationLetter";
+
public int UserId;
public string SettingsName;
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index 57d9ea5f..61590314 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1494,7 +1494,65 @@ namespace WebsitePanel.EnterpriseServer
return result;
}
+ public static List GetOrganizationUsersWithExpiredPassword(int itemId, int daysBeforeExpiration)
+ {
+ // load organization
+ Organization org = GetOrganization(itemId);
+ if (org == null)
+ {
+ return null;
+ }
+
+ Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
+
+ var expiredUsersAd = orgProxy.GetOrganizationUsersWithExpiredPassword(org.OrganizationId, daysBeforeExpiration);
+
+ var expiredUsersDb = GetOrganizationUsersPaged(itemId, null, null, null, 0, int.MaxValue).PageUsers.Where(x => expiredUsersAd.Any(z => z.SamAccountName == x.SamAccountName)).ToList();
+
+ foreach (var user in expiredUsersDb)
+ {
+ var adUser = expiredUsersAd.First(x => x.SamAccountName == user.SamAccountName);
+
+ user.PasswordExpirationDateTime = adUser.PasswordExpirationDateTime;
+ }
+
+ return expiredUsersDb;
+ }
+
+ public static void SendResetUserPasswordEmail(UserInfo owner, OrganizationUser user, string mailTo, string logoUrl)
+ {
+ UserSettings settings = UserController.GetUserSettings(owner.UserId, UserSettings.USER_PASSWORD_EXPIRATION_LETTER);
+
+ if (string.IsNullOrEmpty(logoUrl))
+ {
+ logoUrl = settings["LogoUrl"];
+ }
+
+ string from = settings["From"];
+
+ string subject = settings["Subject"];
+ string body = owner.HtmlMail ? settings["HtmlBody"] : settings["TextBody"];
+ bool isHtml = owner.HtmlMail;
+
+ MailPriority priority = MailPriority.Normal;
+
+ if (!String.IsNullOrEmpty(settings["Priority"]))
+ {
+ priority = (MailPriority)Enum.Parse(typeof(MailPriority), settings["Priority"], true);
+ }
+
+ Hashtable items = new Hashtable();
+
+ items["user"] = user;
+ items["logoUrl"] = logoUrl;
+ items["passwordResetLink"] = "reset link";
+
+ body = PackageController.EvaluateTemplate(body, items);
+
+ // send mail message
+ //MailHelper.SendMessage(from, mailTo, string.Empty, subject, body, priority, isHtml);
+ }
private static bool EmailAddressExists(string emailAddress)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
new file mode 100644
index 00000000..debd1ee4
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Mail;
+using WebsitePanel.Providers.HostedSolution;
+
+namespace WebsitePanel.EnterpriseServer
+{
+ public class UserPasswordExpirationNotificationTask : SchedulerTask
+ {
+ private static readonly string TaskId = "SCHEDULE_TASK_DOMAIN_EXPIRATION";
+
+ // Input parameters:
+ private static readonly string DaysBeforeNotify = "DAYS_BEFORE_EXPIRATION";
+
+ public override void DoWork()
+ {
+ BackgroundTask topTask = TaskManager.TopTask;
+
+ int daysBeforeNotify;
+
+ // check input parameters
+ if (!int.TryParse((string)topTask.GetParamValue(DaysBeforeNotify), out daysBeforeNotify))
+ {
+ TaskManager.WriteWarning("Specify 'Notify before (days)' task parameter");
+ return;
+ }
+
+ var owner = UserController.GetUser(topTask.EffectiveUserId);
+
+ var packages = PackageController.GetMyPackages(topTask.EffectiveUserId);
+
+ foreach (var package in packages)
+ {
+ var organizations = ExchangeServerController.GetExchangeOrganizations(package.PackageId, true);
+
+ foreach (var organization in organizations)
+ {
+ var usersWithExpiredPasswords = OrganizationController.GetOrganizationUsersWithExpiredPassword(organization.Id, daysBeforeNotify);
+
+ foreach (var user in usersWithExpiredPasswords)
+ {
+ if (string.IsNullOrEmpty(user.PrimaryEmailAddress))
+ {
+ TaskManager.WriteWarning(string.Format("Unable to send email to {0} user (organization: {1}), user primary email address is not set.", user.DisplayName, organization.OrganizationId));
+ continue;
+ }
+
+ TaskManager.Write(string.Format("Email sent to {0} user (organization: {1}).", user.DisplayName, organization.OrganizationId));
+
+ OrganizationController.SendResetUserPasswordEmail(owner, user, user.PrimaryEmailAddress, string.Empty);
+ }
+ }
+ }
+
+ // send mail message
+ // MailHelper.SendMessage(mailFrom, mailTo, mailSubject, mailBody, false);
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj
index 58c17bbf..cc5a9f03 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/WebsitePanel.EnterpriseServer.Code.csproj
@@ -158,6 +158,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs
index ea66403f..99e2c637 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/IOrganization.cs
@@ -26,6 +26,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+using System.Collections.Generic;
using WebsitePanel.Providers.OS;
using WebsitePanel.Providers.ResultObjects;
@@ -96,5 +97,7 @@ namespace WebsitePanel.Providers.HostedSolution
void SetDriveMapsTargetingFilter(string organizationId, ExchangeAccount[] accounts, string folderName);
void ChangeDriveMapFolderPath(string organizationId, string oldFolder, string newFolder);
+
+ List GetOrganizationUsersWithExpiredPassword(string organizationId, int daysBeforeExpiration);
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs
index b0c18b83..5a1dfb5d 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.Base/HostedSolution/OrganizationUser.cs
@@ -334,5 +334,7 @@ namespace WebsitePanel.Providers.HostedSolution
get { return userMustChangePassword; }
set { userMustChangePassword = value; }
}
+
+ public DateTime PasswordExpirationDateTime { get; set; }
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
index 44ee8db4..26d4dfb8 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.DirectoryServices.ActiveDirectory;
using System.IO;
using System.Xml;
using System.Linq;
@@ -480,6 +481,77 @@ namespace WebsitePanel.Providers.HostedSolution
return Errors.OK;
}
+ public List GetOrganizationUsersWithExpiredPassword(string organizationId, int daysBeforeExpiration)
+ {
+ return GetOrganizationUsersWithExpiredPasswordInternal(organizationId, daysBeforeExpiration);
+ }
+
+ internal List GetOrganizationUsersWithExpiredPasswordInternal(string organizationId, int daysBeforeExpiration)
+ {
+ var result = new List();
+
+ var maxPasswordAgeSpan = GetMaxPasswordAge();
+
+ var searchRoot = new DirectoryEntry(GetOrganizationPath(organizationId));
+
+ var search = new DirectorySearcher(searchRoot)
+ {
+ SearchScope = SearchScope.Subtree,
+ Filter = "(objectClass=user)"
+ };
+
+ search.PropertiesToLoad.Add("pwdLastSet");
+ search.PropertiesToLoad.Add("sAMAccountName");
+
+ SearchResultCollection searchResults = search.FindAll();
+
+ foreach (SearchResult searchResult in searchResults)
+ {
+ var pwdLastSetTicks = (long)searchResult.Properties["pwdLastSet"][0];
+
+ var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
+
+ var expirationDate = pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
+
+ if (pwdLastSetDate > expirationDate.AddDays(-daysBeforeExpiration))
+ {
+ var user = new OrganizationUser();
+
+ user.PasswordExpirationDateTime = expirationDate;
+ user.SamAccountName = (string)searchResult.Properties["sAMAccountName"][0];
+
+ result.Add(user);
+ }
+ }
+
+ return result;
+ }
+
+ internal TimeSpan GetMaxPasswordAge()
+ {
+ using (Domain d = Domain.GetCurrentDomain())
+ {
+ using (DirectoryEntry domain = d.GetDirectoryEntry())
+ {
+ DirectorySearcher ds = new DirectorySearcher(
+ domain,
+ "(objectClass=*)",
+ null,
+ SearchScope.Base
+ );
+
+ SearchResult sr = ds.FindOne();
+
+ if (sr != null && sr.Properties.Contains("maxPwdAge"))
+ {
+ return TimeSpan.FromTicks((long)sr.Properties["maxPwdAge"][0]).Duration();
+ }
+
+ throw new Exception("'maxPwdAge' property not found.");
+ }
+ }
+ }
+
public PasswordPolicyResult GetPasswordPolicy()
{
return GetPasswordPolicyInternal();
diff --git a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs
index fa24e922..ef15952c 100644
--- a/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Server.Client/OrganizationProxy.cs
@@ -1,39 +1,7 @@
-// Copyright (c) 2015, Outercurve Foundation.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without modification,
-// are permitted provided that the following conditions are met:
-//
-// - Redistributions of source code must retain the above copyright notice, this
-// list of conditions and the following disclaimer.
-//
-// - Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-//
-// - Neither the name of the Outercurve Foundation nor the names of its
-// contributors may be used to endorse or promote products derived from this
-// software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-using WebsitePanel.Providers.ResultObjects;
-using WebsitePanel.Providers.OS;
-using WebsitePanel.Providers.Common;
-
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.5466
+// Runtime Version:2.0.50727.7905
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -41,329 +9,311 @@ using WebsitePanel.Providers.Common;
//------------------------------------------------------------------------------
//
-// This source code was auto-generated by wsdl, Version=2.0.50727.42.
+// This source code was auto-generated by wsdl, Version=2.0.50727.3038.
//
-namespace WebsitePanel.Providers.HostedSolution
-{
+
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.OS;
+using WebsitePanel.Providers.ResultObjects;
+
+namespace WebsitePanel.Providers.HostedSolution {
using System.Xml.Serialization;
using System.Web.Services;
using System.ComponentModel;
using System.Web.Services.Protocols;
using System;
using System.Diagnostics;
-
-
+
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- [System.Web.Services.WebServiceBindingAttribute(Name = "OrganizationsSoap", Namespace = "http://tempuri.org/")]
+ [System.Web.Services.WebServiceBindingAttribute(Name="OrganizationsSoap", Namespace="http://tempuri.org/")]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ResultObject))]
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
- public partial class Organizations : Microsoft.Web.Services3.WebServicesClientProtocol
- {
-
+ public partial class Organizations : Microsoft.Web.Services3.WebServicesClientProtocol {
+
public ServiceProviderSettingsSoapHeader ServiceProviderSettingsSoapHeaderValue;
-
+
private System.Threading.SendOrPostCallback OrganizationExistsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback CreateOrganizationOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteOrganizationOperationCompleted;
-
+
private System.Threading.SendOrPostCallback CreateUserOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DisableUserOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteUserOperationCompleted;
-
+
private System.Threading.SendOrPostCallback GetUserGeneralSettingsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback CreateSecurityGroupOperationCompleted;
-
+
private System.Threading.SendOrPostCallback GetSecurityGroupGeneralSettingsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteSecurityGroupOperationCompleted;
-
+
private System.Threading.SendOrPostCallback SetSecurityGroupGeneralSettingsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback AddObjectToSecurityGroupOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteObjectFromSecurityGroupOperationCompleted;
-
+
private System.Threading.SendOrPostCallback SetUserGeneralSettingsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback SetUserPasswordOperationCompleted;
-
+
private System.Threading.SendOrPostCallback SetUserPrincipalNameOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteOrganizationDomainOperationCompleted;
-
+
private System.Threading.SendOrPostCallback CreateOrganizationDomainOperationCompleted;
-
+
private System.Threading.SendOrPostCallback GetPasswordPolicyOperationCompleted;
-
+
private System.Threading.SendOrPostCallback GetSamAccountNameByUserPrincipalNameOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DoesSamAccountNameExistOperationCompleted;
-
+
private System.Threading.SendOrPostCallback GetDriveMapsOperationCompleted;
-
+
private System.Threading.SendOrPostCallback CreateMappedDriveOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteMappedDriveOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteMappedDriveByPathOperationCompleted;
-
+
private System.Threading.SendOrPostCallback DeleteMappedDrivesGPOOperationCompleted;
-
+
private System.Threading.SendOrPostCallback SetDriveMapsTargetingFilterOperationCompleted;
-
+
private System.Threading.SendOrPostCallback ChangeDriveMapFolderPathOperationCompleted;
-
+
+ private System.Threading.SendOrPostCallback GetOrganizationUsersWithExpiredPasswordOperationCompleted;
+
///
- public Organizations()
- {
- this.Url = "http://localhost:9004/Organizations.asmx";
+ public Organizations() {
+ this.Url = "http://localhost:9003/Organizations.asmx";
}
-
+
///
public event OrganizationExistsCompletedEventHandler OrganizationExistsCompleted;
-
+
///
public event CreateOrganizationCompletedEventHandler CreateOrganizationCompleted;
-
+
///
public event DeleteOrganizationCompletedEventHandler DeleteOrganizationCompleted;
-
+
///
public event CreateUserCompletedEventHandler CreateUserCompleted;
-
+
///
public event DisableUserCompletedEventHandler DisableUserCompleted;
-
+
///
public event DeleteUserCompletedEventHandler DeleteUserCompleted;
-
+
///
public event GetUserGeneralSettingsCompletedEventHandler GetUserGeneralSettingsCompleted;
-
+
///
public event CreateSecurityGroupCompletedEventHandler CreateSecurityGroupCompleted;
-
+
///
public event GetSecurityGroupGeneralSettingsCompletedEventHandler GetSecurityGroupGeneralSettingsCompleted;
-
+
///
public event DeleteSecurityGroupCompletedEventHandler DeleteSecurityGroupCompleted;
-
+
///
public event SetSecurityGroupGeneralSettingsCompletedEventHandler SetSecurityGroupGeneralSettingsCompleted;
-
+
///
public event AddObjectToSecurityGroupCompletedEventHandler AddObjectToSecurityGroupCompleted;
-
+
///
public event DeleteObjectFromSecurityGroupCompletedEventHandler DeleteObjectFromSecurityGroupCompleted;
-
+
///
public event SetUserGeneralSettingsCompletedEventHandler SetUserGeneralSettingsCompleted;
-
+
///
public event SetUserPasswordCompletedEventHandler SetUserPasswordCompleted;
-
+
///
public event SetUserPrincipalNameCompletedEventHandler SetUserPrincipalNameCompleted;
-
+
///
public event DeleteOrganizationDomainCompletedEventHandler DeleteOrganizationDomainCompleted;
-
+
///
public event CreateOrganizationDomainCompletedEventHandler CreateOrganizationDomainCompleted;
-
+
///
public event GetPasswordPolicyCompletedEventHandler GetPasswordPolicyCompleted;
-
+
///
public event GetSamAccountNameByUserPrincipalNameCompletedEventHandler GetSamAccountNameByUserPrincipalNameCompleted;
-
+
///
public event DoesSamAccountNameExistCompletedEventHandler DoesSamAccountNameExistCompleted;
-
+
///
public event GetDriveMapsCompletedEventHandler GetDriveMapsCompleted;
-
+
///
public event CreateMappedDriveCompletedEventHandler CreateMappedDriveCompleted;
-
+
///
public event DeleteMappedDriveCompletedEventHandler DeleteMappedDriveCompleted;
-
+
///
public event DeleteMappedDriveByPathCompletedEventHandler DeleteMappedDriveByPathCompleted;
-
+
///
public event DeleteMappedDrivesGPOCompletedEventHandler DeleteMappedDrivesGPOCompleted;
-
+
///
public event SetDriveMapsTargetingFilterCompletedEventHandler SetDriveMapsTargetingFilterCompleted;
-
+
///
public event ChangeDriveMapFolderPathCompletedEventHandler ChangeDriveMapFolderPathCompleted;
-
+
+ ///
+ public event GetOrganizationUsersWithExpiredPasswordCompletedEventHandler GetOrganizationUsersWithExpiredPasswordCompleted;
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public bool OrganizationExists(string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/OrganizationExists", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public bool OrganizationExists(string organizationId) {
object[] results = this.Invoke("OrganizationExists", new object[] {
organizationId});
return ((bool)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginOrganizationExists(string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginOrganizationExists(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("OrganizationExists", new object[] {
organizationId}, callback, asyncState);
}
-
+
///
- public bool EndOrganizationExists(System.IAsyncResult asyncResult)
- {
+ public bool EndOrganizationExists(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
-
+
///
- public void OrganizationExistsAsync(string organizationId)
- {
+ public void OrganizationExistsAsync(string organizationId) {
this.OrganizationExistsAsync(organizationId, null);
}
-
+
///
- public void OrganizationExistsAsync(string organizationId, object userState)
- {
- if ((this.OrganizationExistsOperationCompleted == null))
- {
+ public void OrganizationExistsAsync(string organizationId, object userState) {
+ if ((this.OrganizationExistsOperationCompleted == null)) {
this.OrganizationExistsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOrganizationExistsOperationCompleted);
}
this.InvokeAsync("OrganizationExists", new object[] {
organizationId}, this.OrganizationExistsOperationCompleted, userState);
}
-
- private void OnOrganizationExistsOperationCompleted(object arg)
- {
- if ((this.OrganizationExistsCompleted != null))
- {
+
+ private void OnOrganizationExistsOperationCompleted(object arg) {
+ if ((this.OrganizationExistsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.OrganizationExistsCompleted(this, new OrganizationExistsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public Organization CreateOrganization(string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public Organization CreateOrganization(string organizationId) {
object[] results = this.Invoke("CreateOrganization", new object[] {
organizationId});
return ((Organization)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginCreateOrganization(string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginCreateOrganization(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreateOrganization", new object[] {
organizationId}, callback, asyncState);
}
-
+
///
- public Organization EndCreateOrganization(System.IAsyncResult asyncResult)
- {
+ public Organization EndCreateOrganization(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((Organization)(results[0]));
}
-
+
///
- public void CreateOrganizationAsync(string organizationId)
- {
+ public void CreateOrganizationAsync(string organizationId) {
this.CreateOrganizationAsync(organizationId, null);
}
-
+
///
- public void CreateOrganizationAsync(string organizationId, object userState)
- {
- if ((this.CreateOrganizationOperationCompleted == null))
- {
+ public void CreateOrganizationAsync(string organizationId, object userState) {
+ if ((this.CreateOrganizationOperationCompleted == null)) {
this.CreateOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationOperationCompleted);
}
this.InvokeAsync("CreateOrganization", new object[] {
organizationId}, this.CreateOrganizationOperationCompleted, userState);
}
-
- private void OnCreateOrganizationOperationCompleted(object arg)
- {
- if ((this.CreateOrganizationCompleted != null))
- {
+
+ private void OnCreateOrganizationOperationCompleted(object arg) {
+ if ((this.CreateOrganizationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateOrganizationCompleted(this, new CreateOrganizationCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteOrganization(string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganization", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteOrganization(string organizationId) {
this.Invoke("DeleteOrganization", new object[] {
organizationId});
}
-
+
///
- public System.IAsyncResult BeginDeleteOrganization(string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteOrganization(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteOrganization", new object[] {
organizationId}, callback, asyncState);
}
-
+
///
- public void EndDeleteOrganization(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteOrganization(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteOrganizationAsync(string organizationId)
- {
+ public void DeleteOrganizationAsync(string organizationId) {
this.DeleteOrganizationAsync(organizationId, null);
}
-
+
///
- public void DeleteOrganizationAsync(string organizationId, object userState)
- {
- if ((this.DeleteOrganizationOperationCompleted == null))
- {
+ public void DeleteOrganizationAsync(string organizationId, object userState) {
+ if ((this.DeleteOrganizationOperationCompleted == null)) {
this.DeleteOrganizationOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationOperationCompleted);
}
this.InvokeAsync("DeleteOrganization", new object[] {
organizationId}, this.DeleteOrganizationOperationCompleted, userState);
}
-
- private void OnDeleteOrganizationOperationCompleted(object arg)
- {
- if ((this.DeleteOrganizationCompleted != null))
- {
+
+ private void OnDeleteOrganizationOperationCompleted(object arg) {
+ if ((this.DeleteOrganizationCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteOrganizationCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public int CreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) {
object[] results = this.Invoke("CreateUser", new object[] {
organizationId,
loginName,
@@ -373,10 +323,9 @@ namespace WebsitePanel.Providers.HostedSolution
enabled});
return ((int)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginCreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginCreateUser(string organizationId, string loginName, string displayName, string upn, string password, bool enabled, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreateUser", new object[] {
organizationId,
loginName,
@@ -385,25 +334,21 @@ namespace WebsitePanel.Providers.HostedSolution
password,
enabled}, callback, asyncState);
}
-
+
///
- public int EndCreateUser(System.IAsyncResult asyncResult)
- {
+ public int EndCreateUser(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
-
+
///
- public void CreateUserAsync(string organizationId, string loginName, string displayName, string upn, string password, bool enabled)
- {
+ public void CreateUserAsync(string organizationId, string loginName, string displayName, string upn, string password, bool enabled) {
this.CreateUserAsync(organizationId, loginName, displayName, upn, password, enabled, null);
}
-
+
///
- public void CreateUserAsync(string organizationId, string loginName, string displayName, string upn, string password, bool enabled, object userState)
- {
- if ((this.CreateUserOperationCompleted == null))
- {
+ public void CreateUserAsync(string organizationId, string loginName, string displayName, string upn, string password, bool enabled, object userState) {
+ if ((this.CreateUserOperationCompleted == null)) {
this.CreateUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateUserOperationCompleted);
}
this.InvokeAsync("CreateUser", new object[] {
@@ -414,367 +359,311 @@ namespace WebsitePanel.Providers.HostedSolution
password,
enabled}, this.CreateUserOperationCompleted, userState);
}
-
- private void OnCreateUserOperationCompleted(object arg)
- {
- if ((this.CreateUserCompleted != null))
- {
+
+ private void OnCreateUserOperationCompleted(object arg) {
+ if ((this.CreateUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateUserCompleted(this, new CreateUserCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DisableUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DisableUser(string loginName, string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DisableUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DisableUser(string loginName, string organizationId) {
this.Invoke("DisableUser", new object[] {
loginName,
organizationId});
}
-
+
///
- public System.IAsyncResult BeginDisableUser(string loginName, string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDisableUser(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DisableUser", new object[] {
loginName,
organizationId}, callback, asyncState);
}
-
+
///
- public void EndDisableUser(System.IAsyncResult asyncResult)
- {
+ public void EndDisableUser(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DisableUserAsync(string loginName, string organizationId)
- {
+ public void DisableUserAsync(string loginName, string organizationId) {
this.DisableUserAsync(loginName, organizationId, null);
}
-
+
///
- public void DisableUserAsync(string loginName, string organizationId, object userState)
- {
- if ((this.DisableUserOperationCompleted == null))
- {
+ public void DisableUserAsync(string loginName, string organizationId, object userState) {
+ if ((this.DisableUserOperationCompleted == null)) {
this.DisableUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDisableUserOperationCompleted);
}
this.InvokeAsync("DisableUser", new object[] {
loginName,
organizationId}, this.DisableUserOperationCompleted, userState);
}
-
- private void OnDisableUserOperationCompleted(object arg)
- {
- if ((this.DisableUserCompleted != null))
- {
+
+ private void OnDisableUserOperationCompleted(object arg) {
+ if ((this.DisableUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DisableUserCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteUser(string loginName, string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteUser", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteUser(string loginName, string organizationId) {
this.Invoke("DeleteUser", new object[] {
loginName,
organizationId});
}
-
+
///
- public System.IAsyncResult BeginDeleteUser(string loginName, string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteUser(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteUser", new object[] {
loginName,
organizationId}, callback, asyncState);
}
-
+
///
- public void EndDeleteUser(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteUser(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteUserAsync(string loginName, string organizationId)
- {
+ public void DeleteUserAsync(string loginName, string organizationId) {
this.DeleteUserAsync(loginName, organizationId, null);
}
-
+
///
- public void DeleteUserAsync(string loginName, string organizationId, object userState)
- {
- if ((this.DeleteUserOperationCompleted == null))
- {
+ public void DeleteUserAsync(string loginName, string organizationId, object userState) {
+ if ((this.DeleteUserOperationCompleted == null)) {
this.DeleteUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteUserOperationCompleted);
}
this.InvokeAsync("DeleteUser", new object[] {
loginName,
organizationId}, this.DeleteUserOperationCompleted, userState);
}
-
- private void OnDeleteUserOperationCompleted(object arg)
- {
- if ((this.DeleteUserCompleted != null))
- {
+
+ private void OnDeleteUserOperationCompleted(object arg) {
+ if ((this.DeleteUserCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteUserCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public OrganizationUser GetUserGeneralSettings(string loginName, string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrganizationUser GetUserGeneralSettings(string loginName, string organizationId) {
object[] results = this.Invoke("GetUserGeneralSettings", new object[] {
loginName,
organizationId});
return ((OrganizationUser)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginGetUserGeneralSettings(string loginName, string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginGetUserGeneralSettings(string loginName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetUserGeneralSettings", new object[] {
loginName,
organizationId}, callback, asyncState);
}
-
+
///
- public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult)
- {
+ public OrganizationUser EndGetUserGeneralSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationUser)(results[0]));
}
-
+
///
- public void GetUserGeneralSettingsAsync(string loginName, string organizationId)
- {
+ public void GetUserGeneralSettingsAsync(string loginName, string organizationId) {
this.GetUserGeneralSettingsAsync(loginName, organizationId, null);
}
-
+
///
- public void GetUserGeneralSettingsAsync(string loginName, string organizationId, object userState)
- {
- if ((this.GetUserGeneralSettingsOperationCompleted == null))
- {
+ public void GetUserGeneralSettingsAsync(string loginName, string organizationId, object userState) {
+ if ((this.GetUserGeneralSettingsOperationCompleted == null)) {
this.GetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetUserGeneralSettingsOperationCompleted);
}
this.InvokeAsync("GetUserGeneralSettings", new object[] {
loginName,
organizationId}, this.GetUserGeneralSettingsOperationCompleted, userState);
}
-
- private void OnGetUserGeneralSettingsOperationCompleted(object arg)
- {
- if ((this.GetUserGeneralSettingsCompleted != null))
- {
+
+ private void OnGetUserGeneralSettingsOperationCompleted(object arg) {
+ if ((this.GetUserGeneralSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetUserGeneralSettingsCompleted(this, new GetUserGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public int CreateSecurityGroup(string organizationId, string groupName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateSecurityGroup", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public int CreateSecurityGroup(string organizationId, string groupName) {
object[] results = this.Invoke("CreateSecurityGroup", new object[] {
organizationId,
groupName});
return ((int)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginCreateSecurityGroup(string organizationId, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreateSecurityGroup", new object[] {
organizationId,
groupName}, callback, asyncState);
}
-
+
///
- public int EndCreateSecurityGroup(System.IAsyncResult asyncResult)
- {
+ public int EndCreateSecurityGroup(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
-
+
///
- public void CreateSecurityGroupAsync(string organizationId, string groupName)
- {
+ public void CreateSecurityGroupAsync(string organizationId, string groupName) {
this.CreateSecurityGroupAsync(organizationId, groupName, null);
}
-
+
///
- public void CreateSecurityGroupAsync(string organizationId, string groupName, object userState)
- {
- if ((this.CreateSecurityGroupOperationCompleted == null))
- {
+ public void CreateSecurityGroupAsync(string organizationId, string groupName, object userState) {
+ if ((this.CreateSecurityGroupOperationCompleted == null)) {
this.CreateSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateSecurityGroupOperationCompleted);
}
this.InvokeAsync("CreateSecurityGroup", new object[] {
organizationId,
groupName}, this.CreateSecurityGroupOperationCompleted, userState);
}
-
- private void OnCreateSecurityGroupOperationCompleted(object arg)
- {
- if ((this.CreateSecurityGroupCompleted != null))
- {
+
+ private void OnCreateSecurityGroupOperationCompleted(object arg) {
+ if ((this.CreateSecurityGroupCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateSecurityGroupCompleted(this, new CreateSecurityGroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSecurityGroupGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrganizationSecurityGroup GetSecurityGroupGeneralSettings(string groupName, string organizationId) {
object[] results = this.Invoke("GetSecurityGroupGeneralSettings", new object[] {
groupName,
organizationId});
return ((OrganizationSecurityGroup)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginGetSecurityGroupGeneralSettings(string groupName, string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginGetSecurityGroupGeneralSettings(string groupName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSecurityGroupGeneralSettings", new object[] {
groupName,
organizationId}, callback, asyncState);
}
-
+
///
- public OrganizationSecurityGroup EndGetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult)
- {
+ public OrganizationSecurityGroup EndGetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((OrganizationSecurityGroup)(results[0]));
}
-
+
///
- public void GetSecurityGroupGeneralSettingsAsync(string groupName, string organizationId)
- {
+ public void GetSecurityGroupGeneralSettingsAsync(string groupName, string organizationId) {
this.GetSecurityGroupGeneralSettingsAsync(groupName, organizationId, null);
}
-
+
///
- public void GetSecurityGroupGeneralSettingsAsync(string groupName, string organizationId, object userState)
- {
- if ((this.GetSecurityGroupGeneralSettingsOperationCompleted == null))
- {
+ public void GetSecurityGroupGeneralSettingsAsync(string groupName, string organizationId, object userState) {
+ if ((this.GetSecurityGroupGeneralSettingsOperationCompleted == null)) {
this.GetSecurityGroupGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSecurityGroupGeneralSettingsOperationCompleted);
}
this.InvokeAsync("GetSecurityGroupGeneralSettings", new object[] {
groupName,
organizationId}, this.GetSecurityGroupGeneralSettingsOperationCompleted, userState);
}
-
- private void OnGetSecurityGroupGeneralSettingsOperationCompleted(object arg)
- {
- if ((this.GetSecurityGroupGeneralSettingsCompleted != null))
- {
+
+ private void OnGetSecurityGroupGeneralSettingsOperationCompleted(object arg) {
+ if ((this.GetSecurityGroupGeneralSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetSecurityGroupGeneralSettingsCompleted(this, new GetSecurityGroupGeneralSettingsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteSecurityGroup(string groupName, string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteSecurityGroup", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteSecurityGroup(string groupName, string organizationId) {
this.Invoke("DeleteSecurityGroup", new object[] {
groupName,
organizationId});
}
-
+
///
- public System.IAsyncResult BeginDeleteSecurityGroup(string groupName, string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteSecurityGroup(string groupName, string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteSecurityGroup", new object[] {
groupName,
organizationId}, callback, asyncState);
}
-
+
///
- public void EndDeleteSecurityGroup(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteSecurityGroup(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteSecurityGroupAsync(string groupName, string organizationId)
- {
+ public void DeleteSecurityGroupAsync(string groupName, string organizationId) {
this.DeleteSecurityGroupAsync(groupName, organizationId, null);
}
-
+
///
- public void DeleteSecurityGroupAsync(string groupName, string organizationId, object userState)
- {
- if ((this.DeleteSecurityGroupOperationCompleted == null))
- {
+ public void DeleteSecurityGroupAsync(string groupName, string organizationId, object userState) {
+ if ((this.DeleteSecurityGroupOperationCompleted == null)) {
this.DeleteSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteSecurityGroupOperationCompleted);
}
this.InvokeAsync("DeleteSecurityGroup", new object[] {
groupName,
organizationId}, this.DeleteSecurityGroupOperationCompleted, userState);
}
-
- private void OnDeleteSecurityGroupOperationCompleted(object arg)
- {
- if ((this.DeleteSecurityGroupCompleted != null))
- {
+
+ private void OnDeleteSecurityGroupOperationCompleted(object arg) {
+ if ((this.DeleteSecurityGroupCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSecurityGroupGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetSecurityGroupGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void SetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes) {
this.Invoke("SetSecurityGroupGeneralSettings", new object[] {
organizationId,
groupName,
memberAccounts,
notes});
}
-
+
///
- public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginSetSecurityGroupGeneralSettings(string organizationId, string groupName, string[] memberAccounts, string notes, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetSecurityGroupGeneralSettings", new object[] {
organizationId,
groupName,
memberAccounts,
notes}, callback, asyncState);
}
-
+
///
- public void EndSetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult)
- {
+ public void EndSetSecurityGroupGeneralSettings(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes)
- {
+ public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes) {
this.SetSecurityGroupGeneralSettingsAsync(organizationId, groupName, memberAccounts, notes, null);
}
-
+
///
- public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes, object userState)
- {
- if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null))
- {
+ public void SetSecurityGroupGeneralSettingsAsync(string organizationId, string groupName, string[] memberAccounts, string notes, object userState) {
+ if ((this.SetSecurityGroupGeneralSettingsOperationCompleted == null)) {
this.SetSecurityGroupGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetSecurityGroupGeneralSettingsOperationCompleted);
}
this.InvokeAsync("SetSecurityGroupGeneralSettings", new object[] {
@@ -783,53 +672,45 @@ namespace WebsitePanel.Providers.HostedSolution
memberAccounts,
notes}, this.SetSecurityGroupGeneralSettingsOperationCompleted, userState);
}
-
- private void OnSetSecurityGroupGeneralSettingsOperationCompleted(object arg)
- {
- if ((this.SetSecurityGroupGeneralSettingsCompleted != null))
- {
+
+ private void OnSetSecurityGroupGeneralSettingsOperationCompleted(object arg) {
+ if ((this.SetSecurityGroupGeneralSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetSecurityGroupGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/AddObjectToSecurityGroup", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void AddObjectToSecurityGroup(string organizationId, string accountName, string groupName) {
this.Invoke("AddObjectToSecurityGroup", new object[] {
organizationId,
accountName,
groupName});
}
-
+
///
- public System.IAsyncResult BeginAddObjectToSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginAddObjectToSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("AddObjectToSecurityGroup", new object[] {
organizationId,
accountName,
groupName}, callback, asyncState);
}
-
+
///
- public void EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult)
- {
+ public void EndAddObjectToSecurityGroup(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName)
- {
+ public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName) {
this.AddObjectToSecurityGroupAsync(organizationId, accountName, groupName, null);
}
-
+
///
- public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
- {
- if ((this.AddObjectToSecurityGroupOperationCompleted == null))
- {
+ public void AddObjectToSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState) {
+ if ((this.AddObjectToSecurityGroupOperationCompleted == null)) {
this.AddObjectToSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddObjectToSecurityGroupOperationCompleted);
}
this.InvokeAsync("AddObjectToSecurityGroup", new object[] {
@@ -837,53 +718,45 @@ namespace WebsitePanel.Providers.HostedSolution
accountName,
groupName}, this.AddObjectToSecurityGroupOperationCompleted, userState);
}
-
- private void OnAddObjectToSecurityGroupOperationCompleted(object arg)
- {
- if ((this.AddObjectToSecurityGroupCompleted != null))
- {
+
+ private void OnAddObjectToSecurityGroupOperationCompleted(object arg) {
+ if ((this.AddObjectToSecurityGroupCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.AddObjectToSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteObjectFromSecurityGroup", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName) {
this.Invoke("DeleteObjectFromSecurityGroup", new object[] {
organizationId,
accountName,
groupName});
}
-
+
///
- public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteObjectFromSecurityGroup(string organizationId, string accountName, string groupName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteObjectFromSecurityGroup", new object[] {
organizationId,
accountName,
groupName}, callback, asyncState);
}
-
+
///
- public void EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteObjectFromSecurityGroup(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName)
- {
+ public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName) {
this.DeleteObjectFromSecurityGroupAsync(organizationId, accountName, groupName, null);
}
-
+
///
- public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState)
- {
- if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null))
- {
+ public void DeleteObjectFromSecurityGroupAsync(string organizationId, string accountName, string groupName, object userState) {
+ if ((this.DeleteObjectFromSecurityGroupOperationCompleted == null)) {
this.DeleteObjectFromSecurityGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteObjectFromSecurityGroupOperationCompleted);
}
this.InvokeAsync("DeleteObjectFromSecurityGroup", new object[] {
@@ -891,50 +764,47 @@ namespace WebsitePanel.Providers.HostedSolution
accountName,
groupName}, this.DeleteObjectFromSecurityGroupOperationCompleted, userState);
}
-
- private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg)
- {
- if ((this.DeleteObjectFromSecurityGroupCompleted != null))
- {
+
+ private void OnDeleteObjectFromSecurityGroupOperationCompleted(object arg) {
+ if ((this.DeleteObjectFromSecurityGroupCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteObjectFromSecurityGroupCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void SetUserGeneralSettings(
- string organizationId,
- string accountName,
- string displayName,
- string password,
- bool hideFromAddressBook,
- bool disabled,
- bool locked,
- string firstName,
- string initials,
- string lastName,
- string address,
- string city,
- string state,
- string zip,
- string country,
- string jobTitle,
- string company,
- string department,
- string office,
- string managerAccountName,
- string businessPhone,
- string fax,
- string homePhone,
- string mobilePhone,
- string pager,
- string webPage,
- string notes,
- string externalEmail,
- bool userMustChangePassword)
- {
+ string organizationId,
+ string accountName,
+ string displayName,
+ string password,
+ bool hideFromAddressBook,
+ bool disabled,
+ bool locked,
+ string firstName,
+ string initials,
+ string lastName,
+ string address,
+ string city,
+ string state,
+ string zip,
+ string country,
+ string jobTitle,
+ string company,
+ string department,
+ string office,
+ string managerAccountName,
+ string businessPhone,
+ string fax,
+ string homePhone,
+ string mobilePhone,
+ string pager,
+ string webPage,
+ string notes,
+ string externalEmail,
+ bool userMustChangePassword) {
this.Invoke("SetUserGeneralSettings", new object[] {
organizationId,
accountName,
@@ -966,41 +836,40 @@ namespace WebsitePanel.Providers.HostedSolution
externalEmail,
userMustChangePassword});
}
-
+
///
public System.IAsyncResult BeginSetUserGeneralSettings(
- string organizationId,
- string accountName,
- string displayName,
- string password,
- bool hideFromAddressBook,
- bool disabled,
- bool locked,
- string firstName,
- string initials,
- string lastName,
- string address,
- string city,
- string state,
- string zip,
- string country,
- string jobTitle,
- string company,
- string department,
- string office,
- string managerAccountName,
- string businessPhone,
- string fax,
- string homePhone,
- string mobilePhone,
- string pager,
- string webPage,
- string notes,
- string externalEmail,
- bool userMustChangePassword,
- System.AsyncCallback callback,
- object asyncState)
- {
+ string organizationId,
+ string accountName,
+ string displayName,
+ string password,
+ bool hideFromAddressBook,
+ bool disabled,
+ bool locked,
+ string firstName,
+ string initials,
+ string lastName,
+ string address,
+ string city,
+ string state,
+ string zip,
+ string country,
+ string jobTitle,
+ string company,
+ string department,
+ string office,
+ string managerAccountName,
+ string businessPhone,
+ string fax,
+ string homePhone,
+ string mobilePhone,
+ string pager,
+ string webPage,
+ string notes,
+ string externalEmail,
+ bool userMustChangePassword,
+ System.AsyncCallback callback,
+ object asyncState) {
return this.BeginInvoke("SetUserGeneralSettings", new object[] {
organizationId,
accountName,
@@ -1032,83 +901,79 @@ namespace WebsitePanel.Providers.HostedSolution
externalEmail,
userMustChangePassword}, callback, asyncState);
}
-
+
///
- public void EndSetUserGeneralSettings(System.IAsyncResult asyncResult)
- {
+ public void EndSetUserGeneralSettings(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
public void SetUserGeneralSettingsAsync(
- string organizationId,
- string accountName,
- string displayName,
- string password,
- bool hideFromAddressBook,
- bool disabled,
- bool locked,
- string firstName,
- string initials,
- string lastName,
- string address,
- string city,
- string state,
- string zip,
- string country,
- string jobTitle,
- string company,
- string department,
- string office,
- string managerAccountName,
- string businessPhone,
- string fax,
- string homePhone,
- string mobilePhone,
- string pager,
- string webPage,
- string notes,
- string externalEmail,
- bool userMustChangePassword)
- {
+ string organizationId,
+ string accountName,
+ string displayName,
+ string password,
+ bool hideFromAddressBook,
+ bool disabled,
+ bool locked,
+ string firstName,
+ string initials,
+ string lastName,
+ string address,
+ string city,
+ string state,
+ string zip,
+ string country,
+ string jobTitle,
+ string company,
+ string department,
+ string office,
+ string managerAccountName,
+ string businessPhone,
+ string fax,
+ string homePhone,
+ string mobilePhone,
+ string pager,
+ string webPage,
+ string notes,
+ string externalEmail,
+ bool userMustChangePassword) {
this.SetUserGeneralSettingsAsync(organizationId, accountName, displayName, password, hideFromAddressBook, disabled, locked, firstName, initials, lastName, address, city, state, zip, country, jobTitle, company, department, office, managerAccountName, businessPhone, fax, homePhone, mobilePhone, pager, webPage, notes, externalEmail, userMustChangePassword, null);
}
-
+
///
public void SetUserGeneralSettingsAsync(
- string organizationId,
- string accountName,
- string displayName,
- string password,
- bool hideFromAddressBook,
- bool disabled,
- bool locked,
- string firstName,
- string initials,
- string lastName,
- string address,
- string city,
- string state,
- string zip,
- string country,
- string jobTitle,
- string company,
- string department,
- string office,
- string managerAccountName,
- string businessPhone,
- string fax,
- string homePhone,
- string mobilePhone,
- string pager,
- string webPage,
- string notes,
- string externalEmail,
- bool userMustChangePassword,
- object userState)
- {
- if ((this.SetUserGeneralSettingsOperationCompleted == null))
- {
+ string organizationId,
+ string accountName,
+ string displayName,
+ string password,
+ bool hideFromAddressBook,
+ bool disabled,
+ bool locked,
+ string firstName,
+ string initials,
+ string lastName,
+ string address,
+ string city,
+ string state,
+ string zip,
+ string country,
+ string jobTitle,
+ string company,
+ string department,
+ string office,
+ string managerAccountName,
+ string businessPhone,
+ string fax,
+ string homePhone,
+ string mobilePhone,
+ string pager,
+ string webPage,
+ string notes,
+ string externalEmail,
+ bool userMustChangePassword,
+ object userState) {
+ if ((this.SetUserGeneralSettingsOperationCompleted == null)) {
this.SetUserGeneralSettingsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserGeneralSettingsOperationCompleted);
}
this.InvokeAsync("SetUserGeneralSettings", new object[] {
@@ -1142,53 +1007,45 @@ namespace WebsitePanel.Providers.HostedSolution
externalEmail,
userMustChangePassword}, this.SetUserGeneralSettingsOperationCompleted, userState);
}
-
- private void OnSetUserGeneralSettingsOperationCompleted(object arg)
- {
- if ((this.SetUserGeneralSettingsCompleted != null))
- {
+
+ private void OnSetUserGeneralSettingsOperationCompleted(object arg) {
+ if ((this.SetUserGeneralSettingsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetUserGeneralSettingsCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void SetUserPassword(string organizationId, string accountName, string password)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void SetUserPassword(string organizationId, string accountName, string password) {
this.Invoke("SetUserPassword", new object[] {
organizationId,
accountName,
password});
}
-
+
///
- public System.IAsyncResult BeginSetUserPassword(string organizationId, string accountName, string password, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginSetUserPassword(string organizationId, string accountName, string password, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetUserPassword", new object[] {
organizationId,
accountName,
password}, callback, asyncState);
}
-
+
///
- public void EndSetUserPassword(System.IAsyncResult asyncResult)
- {
+ public void EndSetUserPassword(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void SetUserPasswordAsync(string organizationId, string accountName, string password)
- {
+ public void SetUserPasswordAsync(string organizationId, string accountName, string password) {
this.SetUserPasswordAsync(organizationId, accountName, password, null);
}
-
+
///
- public void SetUserPasswordAsync(string organizationId, string accountName, string password, object userState)
- {
- if ((this.SetUserPasswordOperationCompleted == null))
- {
+ public void SetUserPasswordAsync(string organizationId, string accountName, string password, object userState) {
+ if ((this.SetUserPasswordOperationCompleted == null)) {
this.SetUserPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPasswordOperationCompleted);
}
this.InvokeAsync("SetUserPassword", new object[] {
@@ -1196,53 +1053,45 @@ namespace WebsitePanel.Providers.HostedSolution
accountName,
password}, this.SetUserPasswordOperationCompleted, userState);
}
-
- private void OnSetUserPasswordOperationCompleted(object arg)
- {
- if ((this.SetUserPasswordCompleted != null))
- {
+
+ private void OnSetUserPasswordOperationCompleted(object arg) {
+ if ((this.SetUserPasswordCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetUserPasswordCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void SetUserPrincipalName(string organizationId, string accountName, string userPrincipalName) {
this.Invoke("SetUserPrincipalName", new object[] {
organizationId,
accountName,
userPrincipalName});
}
-
+
///
- public System.IAsyncResult BeginSetUserPrincipalName(string organizationId, string accountName, string userPrincipalName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginSetUserPrincipalName(string organizationId, string accountName, string userPrincipalName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetUserPrincipalName", new object[] {
organizationId,
accountName,
userPrincipalName}, callback, asyncState);
}
-
+
///
- public void EndSetUserPrincipalName(System.IAsyncResult asyncResult)
- {
+ public void EndSetUserPrincipalName(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName)
- {
+ public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName) {
this.SetUserPrincipalNameAsync(organizationId, accountName, userPrincipalName, null);
}
-
+
///
- public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName, object userState)
- {
- if ((this.SetUserPrincipalNameOperationCompleted == null))
- {
+ public void SetUserPrincipalNameAsync(string organizationId, string accountName, string userPrincipalName, object userState) {
+ if ((this.SetUserPrincipalNameOperationCompleted == null)) {
this.SetUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetUserPrincipalNameOperationCompleted);
}
this.InvokeAsync("SetUserPrincipalName", new object[] {
@@ -1250,323 +1099,272 @@ namespace WebsitePanel.Providers.HostedSolution
accountName,
userPrincipalName}, this.SetUserPrincipalNameOperationCompleted, userState);
}
-
- private void OnSetUserPrincipalNameOperationCompleted(object arg)
- {
- if ((this.SetUserPrincipalNameCompleted != null))
- {
+
+ private void OnSetUserPrincipalNameOperationCompleted(object arg) {
+ if ((this.SetUserPrincipalNameCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetUserPrincipalNameCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteOrganizationDomain(string organizationDistinguishedName, string domain)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteOrganizationDomain(string organizationDistinguishedName, string domain) {
this.Invoke("DeleteOrganizationDomain", new object[] {
organizationDistinguishedName,
domain});
}
-
+
///
- public System.IAsyncResult BeginDeleteOrganizationDomain(string organizationDistinguishedName, string domain, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteOrganizationDomain(string organizationDistinguishedName, string domain, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteOrganizationDomain", new object[] {
organizationDistinguishedName,
domain}, callback, asyncState);
}
-
+
///
- public void EndDeleteOrganizationDomain(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteOrganizationDomain(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteOrganizationDomainAsync(string organizationDistinguishedName, string domain)
- {
+ public void DeleteOrganizationDomainAsync(string organizationDistinguishedName, string domain) {
this.DeleteOrganizationDomainAsync(organizationDistinguishedName, domain, null);
}
-
+
///
- public void DeleteOrganizationDomainAsync(string organizationDistinguishedName, string domain, object userState)
- {
- if ((this.DeleteOrganizationDomainOperationCompleted == null))
- {
+ public void DeleteOrganizationDomainAsync(string organizationDistinguishedName, string domain, object userState) {
+ if ((this.DeleteOrganizationDomainOperationCompleted == null)) {
this.DeleteOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOrganizationDomainOperationCompleted);
}
this.InvokeAsync("DeleteOrganizationDomain", new object[] {
organizationDistinguishedName,
domain}, this.DeleteOrganizationDomainOperationCompleted, userState);
}
-
- private void OnDeleteOrganizationDomainOperationCompleted(object arg)
- {
- if ((this.DeleteOrganizationDomainCompleted != null))
- {
+
+ private void OnDeleteOrganizationDomainOperationCompleted(object arg) {
+ if ((this.DeleteOrganizationDomainCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteOrganizationDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganizationDomain", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void CreateOrganizationDomain(string organizationDistinguishedName, string domain)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateOrganizationDomain", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void CreateOrganizationDomain(string organizationDistinguishedName, string domain) {
this.Invoke("CreateOrganizationDomain", new object[] {
organizationDistinguishedName,
domain});
}
-
+
///
- public System.IAsyncResult BeginCreateOrganizationDomain(string organizationDistinguishedName, string domain, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginCreateOrganizationDomain(string organizationDistinguishedName, string domain, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreateOrganizationDomain", new object[] {
organizationDistinguishedName,
domain}, callback, asyncState);
}
-
+
///
- public void EndCreateOrganizationDomain(System.IAsyncResult asyncResult)
- {
+ public void EndCreateOrganizationDomain(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void CreateOrganizationDomainAsync(string organizationDistinguishedName, string domain)
- {
+ public void CreateOrganizationDomainAsync(string organizationDistinguishedName, string domain) {
this.CreateOrganizationDomainAsync(organizationDistinguishedName, domain, null);
}
-
+
///
- public void CreateOrganizationDomainAsync(string organizationDistinguishedName, string domain, object userState)
- {
- if ((this.CreateOrganizationDomainOperationCompleted == null))
- {
+ public void CreateOrganizationDomainAsync(string organizationDistinguishedName, string domain, object userState) {
+ if ((this.CreateOrganizationDomainOperationCompleted == null)) {
this.CreateOrganizationDomainOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateOrganizationDomainOperationCompleted);
}
this.InvokeAsync("CreateOrganizationDomain", new object[] {
organizationDistinguishedName,
domain}, this.CreateOrganizationDomainOperationCompleted, userState);
}
-
- private void OnCreateOrganizationDomainOperationCompleted(object arg)
- {
- if ((this.CreateOrganizationDomainCompleted != null))
- {
+
+ private void OnCreateOrganizationDomainOperationCompleted(object arg) {
+ if ((this.CreateOrganizationDomainCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateOrganizationDomainCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public PasswordPolicyResult GetPasswordPolicy()
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordPolicy", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public PasswordPolicyResult GetPasswordPolicy() {
object[] results = this.Invoke("GetPasswordPolicy", new object[0]);
return ((PasswordPolicyResult)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginGetPasswordPolicy(System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginGetPasswordPolicy(System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetPasswordPolicy", new object[0], callback, asyncState);
}
-
+
///
- public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult)
- {
+ public PasswordPolicyResult EndGetPasswordPolicy(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((PasswordPolicyResult)(results[0]));
}
-
+
///
- public void GetPasswordPolicyAsync()
- {
+ public void GetPasswordPolicyAsync() {
this.GetPasswordPolicyAsync(null);
}
-
+
///
- public void GetPasswordPolicyAsync(object userState)
- {
- if ((this.GetPasswordPolicyOperationCompleted == null))
- {
+ public void GetPasswordPolicyAsync(object userState) {
+ if ((this.GetPasswordPolicyOperationCompleted == null)) {
this.GetPasswordPolicyOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPasswordPolicyOperationCompleted);
}
this.InvokeAsync("GetPasswordPolicy", new object[0], this.GetPasswordPolicyOperationCompleted, userState);
}
-
- private void OnGetPasswordPolicyOperationCompleted(object arg)
- {
- if ((this.GetPasswordPolicyCompleted != null))
- {
+
+ private void OnGetPasswordPolicyOperationCompleted(object arg) {
+ if ((this.GetPasswordPolicyCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetPasswordPolicyCompleted(this, new GetPasswordPolicyCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSamAccountNameByUserPrincipalName", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetSamAccountNameByUserPrincipalName", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public string GetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName) {
object[] results = this.Invoke("GetSamAccountNameByUserPrincipalName", new object[] {
organizationId,
userPrincipalName});
return ((string)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginGetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginGetSamAccountNameByUserPrincipalName(string organizationId, string userPrincipalName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetSamAccountNameByUserPrincipalName", new object[] {
organizationId,
userPrincipalName}, callback, asyncState);
}
-
+
///
- public string EndGetSamAccountNameByUserPrincipalName(System.IAsyncResult asyncResult)
- {
+ public string EndGetSamAccountNameByUserPrincipalName(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((string)(results[0]));
}
-
+
///
- public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName)
- {
+ public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName) {
this.GetSamAccountNameByUserPrincipalNameAsync(organizationId, userPrincipalName, null);
}
-
+
///
- public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName, object userState)
- {
- if ((this.GetSamAccountNameByUserPrincipalNameOperationCompleted == null))
- {
+ public void GetSamAccountNameByUserPrincipalNameAsync(string organizationId, string userPrincipalName, object userState) {
+ if ((this.GetSamAccountNameByUserPrincipalNameOperationCompleted == null)) {
this.GetSamAccountNameByUserPrincipalNameOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetSamAccountNameByUserPrincipalNameOperationCompleted);
}
this.InvokeAsync("GetSamAccountNameByUserPrincipalName", new object[] {
organizationId,
userPrincipalName}, this.GetSamAccountNameByUserPrincipalNameOperationCompleted, userState);
}
-
- private void OnGetSamAccountNameByUserPrincipalNameOperationCompleted(object arg)
- {
- if ((this.GetSamAccountNameByUserPrincipalNameCompleted != null))
- {
+
+ private void OnGetSamAccountNameByUserPrincipalNameOperationCompleted(object arg) {
+ if ((this.GetSamAccountNameByUserPrincipalNameCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetSamAccountNameByUserPrincipalNameCompleted(this, new GetSamAccountNameByUserPrincipalNameCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DoesSamAccountNameExist", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public bool DoesSamAccountNameExist(string accountName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DoesSamAccountNameExist", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public bool DoesSamAccountNameExist(string accountName) {
object[] results = this.Invoke("DoesSamAccountNameExist", new object[] {
accountName});
return ((bool)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginDoesSamAccountNameExist(string accountName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDoesSamAccountNameExist(string accountName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DoesSamAccountNameExist", new object[] {
accountName}, callback, asyncState);
}
-
+
///
- public bool EndDoesSamAccountNameExist(System.IAsyncResult asyncResult)
- {
+ public bool EndDoesSamAccountNameExist(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((bool)(results[0]));
}
-
+
///
- public void DoesSamAccountNameExistAsync(string accountName)
- {
+ public void DoesSamAccountNameExistAsync(string accountName) {
this.DoesSamAccountNameExistAsync(accountName, null);
}
-
+
///
- public void DoesSamAccountNameExistAsync(string accountName, object userState)
- {
- if ((this.DoesSamAccountNameExistOperationCompleted == null))
- {
+ public void DoesSamAccountNameExistAsync(string accountName, object userState) {
+ if ((this.DoesSamAccountNameExistOperationCompleted == null)) {
this.DoesSamAccountNameExistOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDoesSamAccountNameExistOperationCompleted);
}
this.InvokeAsync("DoesSamAccountNameExist", new object[] {
accountName}, this.DoesSamAccountNameExistOperationCompleted, userState);
}
-
- private void OnDoesSamAccountNameExistOperationCompleted(object arg)
- {
- if ((this.DoesSamAccountNameExistCompleted != null))
- {
+
+ private void OnDoesSamAccountNameExistOperationCompleted(object arg) {
+ if ((this.DoesSamAccountNameExistCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DoesSamAccountNameExistCompleted(this, new DoesSamAccountNameExistCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetDriveMaps", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public MappedDrive[] GetDriveMaps(string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetDriveMaps", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public MappedDrive[] GetDriveMaps(string organizationId) {
object[] results = this.Invoke("GetDriveMaps", new object[] {
organizationId});
return ((MappedDrive[])(results[0]));
}
-
+
///
- public System.IAsyncResult BeginGetDriveMaps(string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginGetDriveMaps(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetDriveMaps", new object[] {
organizationId}, callback, asyncState);
}
-
+
///
- public MappedDrive[] EndGetDriveMaps(System.IAsyncResult asyncResult)
- {
+ public MappedDrive[] EndGetDriveMaps(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((MappedDrive[])(results[0]));
}
-
+
///
- public void GetDriveMapsAsync(string organizationId)
- {
+ public void GetDriveMapsAsync(string organizationId) {
this.GetDriveMapsAsync(organizationId, null);
}
-
+
///
- public void GetDriveMapsAsync(string organizationId, object userState)
- {
- if ((this.GetDriveMapsOperationCompleted == null))
- {
+ public void GetDriveMapsAsync(string organizationId, object userState) {
+ if ((this.GetDriveMapsOperationCompleted == null)) {
this.GetDriveMapsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetDriveMapsOperationCompleted);
}
this.InvokeAsync("GetDriveMaps", new object[] {
organizationId}, this.GetDriveMapsOperationCompleted, userState);
}
-
- private void OnGetDriveMapsOperationCompleted(object arg)
- {
- if ((this.GetDriveMapsCompleted != null))
- {
+
+ private void OnGetDriveMapsOperationCompleted(object arg) {
+ if ((this.GetDriveMapsCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.GetDriveMapsCompleted(this, new GetDriveMapsCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateMappedDrive", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public int CreateMappedDrive(string organizationId, string drive, string labelAs, string path)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/CreateMappedDrive", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public int CreateMappedDrive(string organizationId, string drive, string labelAs, string path) {
object[] results = this.Invoke("CreateMappedDrive", new object[] {
organizationId,
drive,
@@ -1574,35 +1372,30 @@ namespace WebsitePanel.Providers.HostedSolution
path});
return ((int)(results[0]));
}
-
+
///
- public System.IAsyncResult BeginCreateMappedDrive(string organizationId, string drive, string labelAs, string path, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginCreateMappedDrive(string organizationId, string drive, string labelAs, string path, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("CreateMappedDrive", new object[] {
organizationId,
drive,
labelAs,
path}, callback, asyncState);
}
-
+
///
- public int EndCreateMappedDrive(System.IAsyncResult asyncResult)
- {
+ public int EndCreateMappedDrive(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
}
-
+
///
- public void CreateMappedDriveAsync(string organizationId, string drive, string labelAs, string path)
- {
+ public void CreateMappedDriveAsync(string organizationId, string drive, string labelAs, string path) {
this.CreateMappedDriveAsync(organizationId, drive, labelAs, path, null);
}
-
+
///
- public void CreateMappedDriveAsync(string organizationId, string drive, string labelAs, string path, object userState)
- {
- if ((this.CreateMappedDriveOperationCompleted == null))
- {
+ public void CreateMappedDriveAsync(string organizationId, string drive, string labelAs, string path, object userState) {
+ if ((this.CreateMappedDriveOperationCompleted == null)) {
this.CreateMappedDriveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateMappedDriveOperationCompleted);
}
this.InvokeAsync("CreateMappedDrive", new object[] {
@@ -1611,203 +1404,171 @@ namespace WebsitePanel.Providers.HostedSolution
labelAs,
path}, this.CreateMappedDriveOperationCompleted, userState);
}
-
- private void OnCreateMappedDriveOperationCompleted(object arg)
- {
- if ((this.CreateMappedDriveCompleted != null))
- {
+
+ private void OnCreateMappedDriveOperationCompleted(object arg) {
+ if ((this.CreateMappedDriveCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.CreateMappedDriveCompleted(this, new CreateMappedDriveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDrive", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteMappedDrive(string organizationId, string drive)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDrive", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteMappedDrive(string organizationId, string drive) {
this.Invoke("DeleteMappedDrive", new object[] {
organizationId,
drive});
}
-
+
///
- public System.IAsyncResult BeginDeleteMappedDrive(string organizationId, string drive, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteMappedDrive(string organizationId, string drive, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteMappedDrive", new object[] {
organizationId,
drive}, callback, asyncState);
}
-
+
///
- public void EndDeleteMappedDrive(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteMappedDrive(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteMappedDriveAsync(string organizationId, string drive)
- {
+ public void DeleteMappedDriveAsync(string organizationId, string drive) {
this.DeleteMappedDriveAsync(organizationId, drive, null);
}
-
+
///
- public void DeleteMappedDriveAsync(string organizationId, string drive, object userState)
- {
- if ((this.DeleteMappedDriveOperationCompleted == null))
- {
+ public void DeleteMappedDriveAsync(string organizationId, string drive, object userState) {
+ if ((this.DeleteMappedDriveOperationCompleted == null)) {
this.DeleteMappedDriveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMappedDriveOperationCompleted);
}
this.InvokeAsync("DeleteMappedDrive", new object[] {
organizationId,
drive}, this.DeleteMappedDriveOperationCompleted, userState);
}
-
- private void OnDeleteMappedDriveOperationCompleted(object arg)
- {
- if ((this.DeleteMappedDriveCompleted != null))
- {
+
+ private void OnDeleteMappedDriveOperationCompleted(object arg) {
+ if ((this.DeleteMappedDriveCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteMappedDriveCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDriveByPath", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteMappedDriveByPath(string organizationId, string path)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDriveByPath", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteMappedDriveByPath(string organizationId, string path) {
this.Invoke("DeleteMappedDriveByPath", new object[] {
organizationId,
path});
}
-
+
///
- public System.IAsyncResult BeginDeleteMappedDriveByPath(string organizationId, string path, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteMappedDriveByPath(string organizationId, string path, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteMappedDriveByPath", new object[] {
organizationId,
path}, callback, asyncState);
}
-
+
///
- public void EndDeleteMappedDriveByPath(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteMappedDriveByPath(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteMappedDriveByPathAsync(string organizationId, string path)
- {
+ public void DeleteMappedDriveByPathAsync(string organizationId, string path) {
this.DeleteMappedDriveByPathAsync(organizationId, path, null);
}
-
+
///
- public void DeleteMappedDriveByPathAsync(string organizationId, string path, object userState)
- {
- if ((this.DeleteMappedDriveByPathOperationCompleted == null))
- {
+ public void DeleteMappedDriveByPathAsync(string organizationId, string path, object userState) {
+ if ((this.DeleteMappedDriveByPathOperationCompleted == null)) {
this.DeleteMappedDriveByPathOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMappedDriveByPathOperationCompleted);
}
this.InvokeAsync("DeleteMappedDriveByPath", new object[] {
organizationId,
path}, this.DeleteMappedDriveByPathOperationCompleted, userState);
}
-
- private void OnDeleteMappedDriveByPathOperationCompleted(object arg)
- {
- if ((this.DeleteMappedDriveByPathCompleted != null))
- {
+
+ private void OnDeleteMappedDriveByPathOperationCompleted(object arg) {
+ if ((this.DeleteMappedDriveByPathCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteMappedDriveByPathCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDrivesGPO", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void DeleteMappedDrivesGPO(string organizationId)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeleteMappedDrivesGPO", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeleteMappedDrivesGPO(string organizationId) {
this.Invoke("DeleteMappedDrivesGPO", new object[] {
organizationId});
}
-
+
///
- public System.IAsyncResult BeginDeleteMappedDrivesGPO(string organizationId, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginDeleteMappedDrivesGPO(string organizationId, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("DeleteMappedDrivesGPO", new object[] {
organizationId}, callback, asyncState);
}
-
+
///
- public void EndDeleteMappedDrivesGPO(System.IAsyncResult asyncResult)
- {
+ public void EndDeleteMappedDrivesGPO(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void DeleteMappedDrivesGPOAsync(string organizationId)
- {
+ public void DeleteMappedDrivesGPOAsync(string organizationId) {
this.DeleteMappedDrivesGPOAsync(organizationId, null);
}
-
+
///
- public void DeleteMappedDrivesGPOAsync(string organizationId, object userState)
- {
- if ((this.DeleteMappedDrivesGPOOperationCompleted == null))
- {
+ public void DeleteMappedDrivesGPOAsync(string organizationId, object userState) {
+ if ((this.DeleteMappedDrivesGPOOperationCompleted == null)) {
this.DeleteMappedDrivesGPOOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteMappedDrivesGPOOperationCompleted);
}
this.InvokeAsync("DeleteMappedDrivesGPO", new object[] {
organizationId}, this.DeleteMappedDrivesGPOOperationCompleted, userState);
}
-
- private void OnDeleteMappedDrivesGPOOperationCompleted(object arg)
- {
- if ((this.DeleteMappedDrivesGPOCompleted != null))
- {
+
+ private void OnDeleteMappedDrivesGPOOperationCompleted(object arg) {
+ if ((this.DeleteMappedDrivesGPOCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.DeleteMappedDrivesGPOCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetDriveMapsTargetingFilter", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void SetDriveMapsTargetingFilter(string organizationId, ExchangeAccount[] accounts, string folderName)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetDriveMapsTargetingFilter", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void SetDriveMapsTargetingFilter(string organizationId, ExchangeAccount[] accounts, string folderName) {
this.Invoke("SetDriveMapsTargetingFilter", new object[] {
organizationId,
accounts,
folderName});
}
-
+
///
- public System.IAsyncResult BeginSetDriveMapsTargetingFilter(string organizationId, ExchangeAccount[] accounts, string folderName, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginSetDriveMapsTargetingFilter(string organizationId, ExchangeAccount[] accounts, string folderName, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("SetDriveMapsTargetingFilter", new object[] {
organizationId,
accounts,
folderName}, callback, asyncState);
}
-
+
///
- public void EndSetDriveMapsTargetingFilter(System.IAsyncResult asyncResult)
- {
+ public void EndSetDriveMapsTargetingFilter(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void SetDriveMapsTargetingFilterAsync(string organizationId, ExchangeAccount[] accounts, string folderName)
- {
+ public void SetDriveMapsTargetingFilterAsync(string organizationId, ExchangeAccount[] accounts, string folderName) {
this.SetDriveMapsTargetingFilterAsync(organizationId, accounts, folderName, null);
}
-
+
///
- public void SetDriveMapsTargetingFilterAsync(string organizationId, ExchangeAccount[] accounts, string folderName, object userState)
- {
- if ((this.SetDriveMapsTargetingFilterOperationCompleted == null))
- {
+ public void SetDriveMapsTargetingFilterAsync(string organizationId, ExchangeAccount[] accounts, string folderName, object userState) {
+ if ((this.SetDriveMapsTargetingFilterOperationCompleted == null)) {
this.SetDriveMapsTargetingFilterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDriveMapsTargetingFilterOperationCompleted);
}
this.InvokeAsync("SetDriveMapsTargetingFilter", new object[] {
@@ -1815,53 +1576,45 @@ namespace WebsitePanel.Providers.HostedSolution
accounts,
folderName}, this.SetDriveMapsTargetingFilterOperationCompleted, userState);
}
-
- private void OnSetDriveMapsTargetingFilterOperationCompleted(object arg)
- {
- if ((this.SetDriveMapsTargetingFilterCompleted != null))
- {
+
+ private void OnSetDriveMapsTargetingFilterOperationCompleted(object arg) {
+ if ((this.SetDriveMapsTargetingFilterCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.SetDriveMapsTargetingFilterCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
[System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
- [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ChangeDriveMapFolderPath", RequestNamespace = "http://tempuri.org/", ResponseNamespace = "http://tempuri.org/", Use = System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle = System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
- public void ChangeDriveMapFolderPath(string organizationId, string oldFolder, string newFolder)
- {
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/ChangeDriveMapFolderPath", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void ChangeDriveMapFolderPath(string organizationId, string oldFolder, string newFolder) {
this.Invoke("ChangeDriveMapFolderPath", new object[] {
organizationId,
oldFolder,
newFolder});
}
-
+
///
- public System.IAsyncResult BeginChangeDriveMapFolderPath(string organizationId, string oldFolder, string newFolder, System.AsyncCallback callback, object asyncState)
- {
+ public System.IAsyncResult BeginChangeDriveMapFolderPath(string organizationId, string oldFolder, string newFolder, System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("ChangeDriveMapFolderPath", new object[] {
organizationId,
oldFolder,
newFolder}, callback, asyncState);
}
-
+
///
- public void EndChangeDriveMapFolderPath(System.IAsyncResult asyncResult)
- {
+ public void EndChangeDriveMapFolderPath(System.IAsyncResult asyncResult) {
this.EndInvoke(asyncResult);
}
-
+
///
- public void ChangeDriveMapFolderPathAsync(string organizationId, string oldFolder, string newFolder)
- {
+ public void ChangeDriveMapFolderPathAsync(string organizationId, string oldFolder, string newFolder) {
this.ChangeDriveMapFolderPathAsync(organizationId, oldFolder, newFolder, null);
}
-
+
///
- public void ChangeDriveMapFolderPathAsync(string organizationId, string oldFolder, string newFolder, object userState)
- {
- if ((this.ChangeDriveMapFolderPathOperationCompleted == null))
- {
+ public void ChangeDriveMapFolderPathAsync(string organizationId, string oldFolder, string newFolder, object userState) {
+ if ((this.ChangeDriveMapFolderPathOperationCompleted == null)) {
this.ChangeDriveMapFolderPathOperationCompleted = new System.Threading.SendOrPostCallback(this.OnChangeDriveMapFolderPathOperationCompleted);
}
this.InvokeAsync("ChangeDriveMapFolderPath", new object[] {
@@ -1869,418 +1622,442 @@ namespace WebsitePanel.Providers.HostedSolution
oldFolder,
newFolder}, this.ChangeDriveMapFolderPathOperationCompleted, userState);
}
-
- private void OnChangeDriveMapFolderPathOperationCompleted(object arg)
- {
- if ((this.ChangeDriveMapFolderPathCompleted != null))
- {
+
+ private void OnChangeDriveMapFolderPathOperationCompleted(object arg) {
+ if ((this.ChangeDriveMapFolderPathCompleted != null)) {
System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
this.ChangeDriveMapFolderPathCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
}
}
-
+
///
- public new void CancelAsync(object userState)
- {
+ [System.Web.Services.Protocols.SoapHeaderAttribute("ServiceProviderSettingsSoapHeaderValue")]
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetOrganizationUsersWithExpiredPassword", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public OrganizationUser[] GetOrganizationUsersWithExpiredPassword(string organizationId, int daysBeforeExpiration) {
+ object[] results = this.Invoke("GetOrganizationUsersWithExpiredPassword", new object[] {
+ organizationId,
+ daysBeforeExpiration});
+ return ((OrganizationUser[])(results[0]));
+ }
+
+ ///
+ public System.IAsyncResult BeginGetOrganizationUsersWithExpiredPassword(string organizationId, int daysBeforeExpiration, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("GetOrganizationUsersWithExpiredPassword", new object[] {
+ organizationId,
+ daysBeforeExpiration}, callback, asyncState);
+ }
+
+ ///
+ public OrganizationUser[] EndGetOrganizationUsersWithExpiredPassword(System.IAsyncResult asyncResult) {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((OrganizationUser[])(results[0]));
+ }
+
+ ///
+ public void GetOrganizationUsersWithExpiredPasswordAsync(string organizationId, int daysBeforeExpiration) {
+ this.GetOrganizationUsersWithExpiredPasswordAsync(organizationId, daysBeforeExpiration, null);
+ }
+
+ ///
+ public void GetOrganizationUsersWithExpiredPasswordAsync(string organizationId, int daysBeforeExpiration, object userState) {
+ if ((this.GetOrganizationUsersWithExpiredPasswordOperationCompleted == null)) {
+ this.GetOrganizationUsersWithExpiredPasswordOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetOrganizationUsersWithExpiredPasswordOperationCompleted);
+ }
+ this.InvokeAsync("GetOrganizationUsersWithExpiredPassword", new object[] {
+ organizationId,
+ daysBeforeExpiration}, this.GetOrganizationUsersWithExpiredPasswordOperationCompleted, userState);
+ }
+
+ private void OnGetOrganizationUsersWithExpiredPasswordOperationCompleted(object arg) {
+ if ((this.GetOrganizationUsersWithExpiredPasswordCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.GetOrganizationUsersWithExpiredPasswordCompleted(this, new GetOrganizationUsersWithExpiredPasswordCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ public new void CancelAsync(object userState) {
base.CancelAsync(userState);
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void OrganizationExistsCompletedEventHandler(object sender, OrganizationExistsCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class OrganizationExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class OrganizationExistsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal OrganizationExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal OrganizationExistsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public bool Result
- {
- get
- {
+ public bool Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateOrganizationCompletedEventHandler(object sender, CreateOrganizationCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class CreateOrganizationCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal CreateOrganizationCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public Organization Result
- {
- get
- {
+ public Organization Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((Organization)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteOrganizationCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateUserCompletedEventHandler(object sender, CreateUserCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class CreateUserCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal CreateUserCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public int Result
- {
- get
- {
+ public int Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DisableUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteUserCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetUserGeneralSettingsCompletedEventHandler(object sender, GetUserGeneralSettingsCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class GetUserGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal GetUserGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public OrganizationUser Result
- {
- get
- {
+ public OrganizationUser Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((OrganizationUser)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateSecurityGroupCompletedEventHandler(object sender, CreateSecurityGroupCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class CreateSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class CreateSecurityGroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal CreateSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal CreateSecurityGroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public int Result
- {
- get
- {
+ public int Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, GetSecurityGroupGeneralSettingsCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class GetSecurityGroupGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class GetSecurityGroupGeneralSettingsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal GetSecurityGroupGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal GetSecurityGroupGeneralSettingsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public OrganizationSecurityGroup Result
- {
- get
- {
+ public OrganizationSecurityGroup Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((OrganizationSecurityGroup)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetSecurityGroupGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void AddObjectToSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteObjectFromSecurityGroupCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetUserGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetUserPasswordCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetUserPrincipalNameCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateOrganizationDomainCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetPasswordPolicyCompletedEventHandler(object sender, GetPasswordPolicyCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class GetPasswordPolicyCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal GetPasswordPolicyCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public PasswordPolicyResult Result
- {
- get
- {
+ public PasswordPolicyResult Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((PasswordPolicyResult)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetSamAccountNameByUserPrincipalNameCompletedEventHandler(object sender, GetSamAccountNameByUserPrincipalNameCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class GetSamAccountNameByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class GetSamAccountNameByUserPrincipalNameCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal GetSamAccountNameByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal GetSamAccountNameByUserPrincipalNameCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public string Result
- {
- get
- {
+ public string Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((string)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DoesSamAccountNameExistCompletedEventHandler(object sender, DoesSamAccountNameExistCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class DoesSamAccountNameExistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class DoesSamAccountNameExistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal DoesSamAccountNameExistCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal DoesSamAccountNameExistCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public bool Result
- {
- get
- {
+ public bool Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((bool)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void GetDriveMapsCompletedEventHandler(object sender, GetDriveMapsCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class GetDriveMapsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class GetDriveMapsCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal GetDriveMapsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal GetDriveMapsCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public MappedDrive[] Result
- {
- get
- {
+ public MappedDrive[] Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((MappedDrive[])(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void CreateMappedDriveCompletedEventHandler(object sender, CreateMappedDriveCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
- public partial class CreateMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs
- {
-
+ public partial class CreateMappedDriveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
private object[] results;
-
- internal CreateMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
- base(exception, cancelled, userState)
- {
+
+ internal CreateMappedDriveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
this.results = results;
}
-
+
///
- public int Result
- {
- get
- {
+ public int Result {
+ get {
this.RaiseExceptionIfNecessary();
return ((int)(this.results[0]));
}
}
}
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteMappedDriveCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteMappedDriveByPathCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void DeleteMappedDrivesGPOCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void SetDriveMapsTargetingFilterCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
-
+
///
- [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void ChangeDriveMapFolderPathCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ public delegate void GetOrganizationUsersWithExpiredPasswordCompletedEventHandler(object sender, GetOrganizationUsersWithExpiredPasswordCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetOrganizationUsersWithExpiredPasswordCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal GetOrganizationUsersWithExpiredPasswordCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public OrganizationUser[] Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((OrganizationUser[])(this.results[0]));
+ }
+ }
+ }
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs
index 2b2abc5f..4cae8631 100644
--- a/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Server/Organizations.asmx.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Web.Services;
using System.Web.Services.Protocols;
@@ -254,5 +255,11 @@ namespace WebsitePanel.Server
{
Organization.ChangeDriveMapFolderPath(organizationId, oldFolder, newFolder);
}
+
+ [WebMethod, SoapHeader("settings")]
+ public List GetOrganizationUsersWithExpiredPassword(string organizationId, int daysBeforeExpiration)
+ {
+ return Organization.GetOrganizationUsersWithExpiredPassword(organizationId, daysBeforeExpiration);
+ }
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ESModule_ControlsHierarchy.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ESModule_ControlsHierarchy.config
index 7ed16940..f79eefba 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ESModule_ControlsHierarchy.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/ESModule_ControlsHierarchy.config
@@ -13,6 +13,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
index ecbdc1f6..e3263482 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
@@ -471,6 +471,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index cbff0b24..975a6a96 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -3345,7 +3345,6 @@
CRM 4/2011
-
BlackBerry
@@ -3377,7 +3376,7 @@
SharePoint Foundation Server
-
+
SharePoint Server
@@ -5711,4 +5710,7 @@
RDS User experience has been updated
+
+ User password expiration notification
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordExpirationLetter.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordExpirationLetter.ascx.resx
new file mode 100644
index 00000000..b8764bdc
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordExpirationLetter.ascx.resx
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ High
+
+
+ Low
+
+
+ Normal
+
+
+ From:
+
+
+ HTML Body:
+
+
+ Logo Url:
+
+
+ No Changes HTML Body:
+
+
+ No Changes Text Body:
+
+
+ Priority:
+
+
+ Subject:
+
+
+ Text Body:
+
+
+ Webdav portal reset URL:
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
index 2e02f4fe..1ea4b782 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
@@ -150,4 +150,7 @@
RDS Setup Letter
+
+ User Password Expiration Letter
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx
index bcbae1f8..ab9d05c4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserGeneralSettings.ascx.resx
@@ -255,4 +255,7 @@
User must change password at next logon
+
+ Reset Password
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
new file mode 100644
index 00000000..521750a1
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Sent Password Reset Email
+
+
+ Email:
+
+
+ Reason:
+
+
+ Reset Password
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx
index 0cdd7181..dad039a0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx
@@ -74,6 +74,8 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
index faf9723b..bde31fc9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
@@ -435,5 +435,13 @@ namespace WebsitePanel.Portal.HostedSolution
}
+ protected void btnResetUserPassword_Click(object sender, EventArgs e)
+ {
+ Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
+ "user_reset_password",
+ "SpaceID=" + PanelSecurity.PackageId,
+ "Context=" + ((PanelRequest.Context == "Mailbox") ? "Mailbox" : "User"),
+ "AccountID=" + PanelRequest.AccountID));
+ }
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs
index 555a2e6a..3ad5507c 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.designer.cs
@@ -210,6 +210,15 @@ namespace WebsitePanel.Portal.HostedSolution {
///
protected global::System.Web.UI.WebControls.ValidationSummary ValidationSummary2;
+ ///
+ /// btnResetUserPassword control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnResetUserPassword;
+
///
/// chkUserMustChangePassword control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
new file mode 100644
index 00000000..b49be890
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
@@ -0,0 +1,45 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrganizationUserResetPassword.ascx.cs" Inherits="WebsitePanel.Portal.ExchangeServer.OrganizationUserResetPassword" %>
+
+<%@ Register Src="../UserControls/ItemButtonPanel.ascx" TagName="ItemButtonPanel" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.cs
new file mode 100644
index 00000000..7aa28e6f
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using WebsitePanel.Providers.HostedSolution;
+
+namespace WebsitePanel.Portal.ExchangeServer
+{
+ public partial class OrganizationUserResetPassword : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BindSettings();
+ }
+ }
+
+ private void BindSettings()
+ {
+ OrganizationUser user = ES.Services.Organizations.GetUserGeneralSettings(PanelRequest.ItemID,
+ PanelRequest.AccountID);
+
+ litDisplayName.Text = PortalAntiXSS.Encode(user.DisplayName);
+
+ txtEmailAddress.Text = user.PrimaryEmailAddress;
+ }
+
+ protected void btnResetPassoword_Click(object sender, EventArgs e)
+ {
+ if (!Page.IsValid)
+ {
+ return;
+ }
+
+ Response.Redirect(PortalUtils.EditUrl("ItemID", PanelRequest.ItemID.ToString(),
+ (PanelRequest.Context == "Mailbox") ? "mailboxes" : "users",
+ "SpaceID=" + PanelSecurity.PackageId));
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.designer.cs
new file mode 100644
index 00000000..5b263a84
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx.designer.cs
@@ -0,0 +1,114 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal.ExchangeServer {
+
+
+ public partial class OrganizationUserResetPassword {
+
+ ///
+ /// Image1 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image Image1;
+
+ ///
+ /// locTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locTitle;
+
+ ///
+ /// litDisplayName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litDisplayName;
+
+ ///
+ /// locEmailAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locEmailAddress;
+
+ ///
+ /// txtEmailAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtEmailAddress;
+
+ ///
+ /// valEmailAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valEmailAddress;
+
+ ///
+ /// regexEmailValid control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RegularExpressionValidator regexEmailValid;
+
+ ///
+ /// locReason control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locReason;
+
+ ///
+ /// txtReason control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtReason;
+
+ ///
+ /// valReason control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valReason;
+
+ ///
+ /// btnResetPassoword control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnResetPassoword;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/App_LocalResources/UserPasswordExpirationNotificationView.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/App_LocalResources/UserPasswordExpirationNotificationView.ascx.resx
new file mode 100644
index 00000000..85c90909
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/App_LocalResources/UserPasswordExpirationNotificationView.ascx.resx
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 1.3
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx
new file mode 100644
index 00000000..54882d71
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx
@@ -0,0 +1,13 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UserPasswordExpirationNotificationView.ascx.cs" Inherits="WebsitePanel.Portal.ScheduleTaskControls.UserPasswordExpirationNotificationView" %>
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.cs
new file mode 100644
index 00000000..dab296de
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using WebsitePanel.EnterpriseServer;
+using WebsitePanel.Portal.UserControls.ScheduleTaskView;
+
+namespace WebsitePanel.Portal.ScheduleTaskControls
+{
+ public partial class UserPasswordExpirationNotificationView : EmptyView
+ {
+ private static readonly string DaysBeforeParameter = "DAYS_BEFORE_EXPIRATION";
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ ///
+ /// Sets scheduler task parameters on view.
+ ///
+ /// Parameters list to be set on view.
+ public override void SetParameters(ScheduleTaskParameterInfo[] parameters)
+ {
+ base.SetParameters(parameters);
+
+ this.SetParameter(this.txtDaysBeforeNotify, DaysBeforeParameter);
+ }
+
+ ///
+ /// Gets scheduler task parameters from view.
+ ///
+ /// Parameters list filled from view.
+ public override ScheduleTaskParameterInfo[] GetParameters()
+ {
+ ScheduleTaskParameterInfo daysBefore = this.GetParameter(this.txtDaysBeforeNotify, DaysBeforeParameter);
+
+ return new[] { daysBefore };
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.designer.cs
new file mode 100644
index 00000000..cb733b60
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ScheduleTaskControls/UserPasswordExpirationNotificationView.ascx.designer.cs
@@ -0,0 +1,33 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal.ScheduleTaskControls {
+
+
+ public partial class UserPasswordExpirationNotificationView {
+
+ ///
+ /// lblDayBeforeNotify control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblDayBeforeNotify;
+
+ ///
+ /// txtDaysBeforeNotify control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtDaysBeforeNotify;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx
new file mode 100644
index 00000000..a041b140
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx
@@ -0,0 +1,49 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordExpirationLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordExpirationLetter" %>
+
+
+
+ |
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ High
+ Normal
+ Low
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.cs
new file mode 100644
index 00000000..189e66e7
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.cs
@@ -0,0 +1,35 @@
+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 SettingsUserPasswordExpirationLetter : WebsitePanelControlBase, IUserSettingsEditorControl
+ {
+ public void BindSettings(UserSettings settings)
+ {
+ txtFrom.Text = settings["From"];
+ txtWebDavPortalResetUrl.Text = settings["WebDavPortalResetUrl"];
+ txtSubject.Text = settings["Subject"];
+ Utils.SelectListItem(ddlPriority, settings["Priority"]);
+ txtHtmlBody.Text = settings["HtmlBody"];
+ txtTextBody.Text = settings["TextBody"];
+ txtLogoUrl.Text = settings["LogoUrl"];
+ }
+
+ public void SaveSettings(UserSettings settings)
+ {
+ settings["From"] = txtFrom.Text;
+ settings["WebDavPortalResetUrl"] = txtWebDavPortalResetUrl.Text;
+ settings["Subject"] = txtSubject.Text;
+ settings["Priority"] = ddlPriority.SelectedValue;
+ settings["HtmlBody"] = txtHtmlBody.Text;
+ settings["TextBody"] = txtTextBody.Text;
+ settings["LogoUrl"] = txtLogoUrl.Text;
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.designer.cs
new file mode 100644
index 00000000..e8bba7b9
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordExpirationLetter.ascx.designer.cs
@@ -0,0 +1,141 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal {
+
+
+ public partial class SettingsUserPasswordExpirationLetter {
+
+ ///
+ /// lblFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblFrom;
+
+ ///
+ /// txtFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtFrom;
+
+ ///
+ /// lblSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSubject;
+
+ ///
+ /// txtSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSubject;
+
+ ///
+ /// lblPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPriority;
+
+ ///
+ /// ddlPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
+
+ ///
+ /// lblLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblLogoUrl;
+
+ ///
+ /// txtLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtLogoUrl;
+
+ ///
+ /// lblWebDavPortalResetUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblWebDavPortalResetUrl;
+
+ ///
+ /// txtWebDavPortalResetUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtWebDavPortalResetUrl;
+
+ ///
+ /// lblHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblHtmlBody;
+
+ ///
+ /// txtHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
+
+ ///
+ /// lblTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTextBody;
+
+ ///
+ /// txtTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtTextBody;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
index 37f5ca86..9df60dfc 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
@@ -42,6 +42,10 @@
+
+
+
-
+
+
@@ -86,6 +86,8 @@
meta:resourcekey="lblLockedOut" Text="Account Lockout threshold:">
+
|
@@ -96,6 +98,8 @@
meta:resourcekey="lblResetAccountLockout" Text="Reset account lockout counter after (minutes):">
+
|
@@ -154,7 +158,7 @@
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
index 345b5367..0b6398ac 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationSettingsPasswordSettings.ascx.designer.cs
@@ -300,6 +300,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
///
protected global::System.Web.UI.WebControls.TextBox txtLockedOut;
+ ///
+ /// valRequiredLockedOut control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequiredLockedOut;
+
///
/// valCorrectLockedOut control.
///
@@ -336,6 +345,15 @@ namespace WebsitePanel.Portal.ExchangeServer {
///
protected global::System.Web.UI.WebControls.TextBox txtResetAccountLockout;
+ ///
+ /// valRequireResetAccountLockout control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator valRequireResetAccountLockout;
+
///
/// valResetAccountLockout control.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/OrganizationSettingsTabs.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/OrganizationSettingsTabs.ascx.resx
index ecbb2a94..13e577fc 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/OrganizationSettingsTabs.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/App_LocalResources/OrganizationSettingsTabs.ascx.resx
@@ -117,6 +117,9 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ General Settings
+
Password Settings
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/OrganizationSettingsTabs.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/OrganizationSettingsTabs.ascx.cs
index 3fa348da..9d8b50bd 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/OrganizationSettingsTabs.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/UserControls/OrganizationSettingsTabs.ascx.cs
@@ -20,8 +20,11 @@ namespace WebsitePanel.Portal.ExchangeServer.UserControls
private void BindTabs()
{
List tabsList = new List();
+ tabsList.Add(CreateTab("organization_settings_general_settings", "Tab.GeneralSettigns"));
tabsList.Add(CreateTab("organization_settings_password_settings", "Tab.PasswordSettings"));
+
+
int idx = 0;
foreach (Tab tab in tabsList)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
index cde0ab55..989d4f45 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
@@ -244,6 +244,13 @@
OrganizationDeletedUserGeneralSettings.ascx
ASPXCodeBehind
+
+ OrganizationSettingsGeneralSettings.ascx
+ ASPXCodeBehind
+
+
+ OrganizationSettingsGeneralSettings.ascx
+
OrganizationSettingsPasswordSettings.ascx
ASPXCodeBehind
@@ -4571,6 +4578,7 @@
+
@@ -4640,6 +4648,7 @@
+
From dd156737522a31429d7000f0abf9a98b0b323414 Mon Sep 17 00:00:00 2001
From: vfedosevich
Date: Tue, 7 Apr 2015 03:37:35 -0700
Subject: [PATCH 05/38] organization password reset email added + scheduler
fixes
---
WebsitePanel/Database/update_db.sql | 115 +++++++++++++
.../Users/UserSettings.cs | 1 +
.../HostedSolution/OrganizationController.cs | 25 ++-
.../UserPasswordExpirationNotificationTask.cs | 4 +-
.../OrganizationProvider.cs | 20 ++-
.../SettingsUserPasswordResetLetter.ascx.resx | 153 ++++++++++++++++++
.../UserAccountMailTemplateSettings.ascx.resx | 5 +-
.../OrganizationUserResetPassword.ascx.resx | 2 +-
.../OrganizationUserResetPassword.ascx | 2 +-
.../SettingsUserPasswordResetLetter.ascx | 45 ++++++
.../SettingsUserPasswordResetLetter.ascx.cs | 33 ++++
...gsUserPasswordResetLetter.ascx.designer.cs | 123 ++++++++++++++
.../UserAccountMailTemplateSettings.ascx | 4 +
...countMailTemplateSettings.ascx.designer.cs | 9 ++
.../WebsitePanel.Portal.Modules.csproj | 9 ++
15 files changed, 541 insertions(+), 9 deletions(-)
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordResetLetter.ascx.resx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.designer.cs
diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index aa60afa4..09db0c57 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -9598,6 +9598,121 @@ UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterT
GO
+-- USER PASSWORD RESET EMAIL TEMPLATE
+
+
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'From' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'From', N'support@HostingCompany.com')
+END
+GO
+
+DECLARE @UserPasswordResetLetterHtmlBody nvarchar(2500)
+
+Set @UserPasswordResetLetterHtmlBody = N'
+
+ Password expiration notification
+
+
+
+
+
+
Password reset notification
+
+
+
+Hello #user.FirstName#,
+
+
+
+
+We received a request to reset the password for your account. If you made this request, click the link below. If you did not make this request, you can ignore this email.
+
+
+
#passwordResetLink#
+
+
+
+If you have any questions regarding your hosting account, feel free to contact our support department at any time.
+
+
+
+Best regards
+
+
+';
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'HtmlBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'HtmlBody', @UserPasswordResetLetterHtmlBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'HtmlBody'
+GO
+
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'Priority' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'Priority', N'Normal')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'Subject' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'Subject', N'Password reset notification')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'LogoUrl' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
+END
+GO
+
+
+DECLARE @UserPasswordResetLetterTextBody nvarchar(2500)
+
+Set @UserPasswordResetLetterTextBody = N'=========================================
+ Password reset notification
+=========================================
+
+
+Hello #user.FirstName#,
+
+
+We received a request to reset the password for your account. If you made this request, click the link below. If you did not make this request, you can ignore this email.
+
+#passwordResetLink#
+
+If you have any questions regarding your hosting account, feel free to contact our support department at any time.
+
+Best regards'
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'TextBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'TextBody', @UserPasswordResetLetterTextBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'TextBody'
+GO
+
+
+
+
-- ORGANIZATION USER PASSWORD RESET TOKENS
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
index f6780cf5..3d163d59 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Users/UserSettings.cs
@@ -66,6 +66,7 @@ namespace WebsitePanel.EnterpriseServer
public const string RDS_SETUP_LETTER = "RDSSetupLetter";
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 HOSTED_ORGANIZATION_PASSWORD_POLICY = "MailboxPasswordPolicy";
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index e87226ba..f615daaf 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1538,23 +1538,40 @@ namespace WebsitePanel.EnterpriseServer
throw new Exception(string.Format("Organization not found (ItemId = {0})", itemId));
}
+ Organizations orgProxy = GetOrganizationProxy(org.ServiceId);
+
+
UserInfo owner = PackageController.GetPackageOwner(org.PackageId);
OrganizationUser user = OrganizationController.GetAccount(itemId, accountId);
+ OrganizationUser settings = orgProxy.GetUserGeneralSettings(user.AccountName, org.OrganizationId);
+
+ user.PasswordExpirationDateTime = settings.PasswordExpirationDateTime;
+
if (string.IsNullOrEmpty(mailTo))
{
mailTo = user.PrimaryEmailAddress;
}
- SendResetUserPasswordEmail(owner, user, mailTo, reason, string.Empty);
+ var generalSettings = OrganizationController.GetOrganizationGeneralSettings(itemId);
+
+ var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
+
+ SendUserPasswordEmail(owner, user, reason, mailTo, logoUrl, UserSettings.USER_PASSWORD_RESET_LETTER, "USER_PASSWORD_RESET_LETTER");
}
- public static void SendResetUserPasswordEmail(UserInfo owner, OrganizationUser user, string reason, string mailTo, string logoUrl)
+ public static void SendUserExpirationPasswordEmail(UserInfo owner, OrganizationUser user, string reason,
+ string mailTo, string logoUrl)
+ {
+ SendUserPasswordEmail(owner, user, reason, user.PrimaryEmailAddress, logoUrl, UserSettings.USER_PASSWORD_EXPIRATION_LETTER, "USER_PASSWORD_EXPIRATION_LETTER");
+ }
+
+ public static void SendUserPasswordEmail(UserInfo owner, OrganizationUser user, string reason, string mailTo, string logoUrl, string settingsName, string taskName)
{
UserSettings settings = UserController.GetUserSettings(owner.UserId,
- UserSettings.USER_PASSWORD_EXPIRATION_LETTER);
+ settingsName);
- TaskManager.StartTask("ORGANIZATION", "SEND_PASSWORD_RESET_EMAIL", user.ItemId);
+ TaskManager.StartTask("ORGANIZATION", "SEND_" + taskName, user.ItemId);
try
{
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
index 4508a845..bda161b1 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/SchedulerTasks/UserPasswordExpirationNotificationTask.cs
@@ -41,6 +41,8 @@ namespace WebsitePanel.EnterpriseServer
var generalSettings = OrganizationController.GetOrganizationGeneralSettings(organization.Id);
+ var logoUrl = generalSettings != null ? generalSettings.OrganizationLogoUrl : string.Empty;
+
foreach (var user in usersWithExpiredPasswords)
{
user.ItemId = organization.Id;
@@ -51,7 +53,7 @@ namespace WebsitePanel.EnterpriseServer
continue;
}
- OrganizationController.SendResetUserPasswordEmail(owner, user, "Scheduler Password Expiration Notification", user.PrimaryEmailAddress, generalSettings.OrganizationLogoUrl);
+ OrganizationController.SendUserExpirationPasswordEmail(owner, user, "Scheduler Password Expiration Notification", user.PrimaryEmailAddress, logoUrl);
}
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
index ddeeba63..752509c1 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
@@ -490,6 +490,11 @@ namespace WebsitePanel.Providers.HostedSolution
{
var result = new List();
+ if (string.IsNullOrEmpty(organizationId))
+ {
+ return result;
+ }
+
var maxPasswordAgeSpan = GetMaxPasswordAge();
var searchRoot = new DirectoryEntry(GetOrganizationPath(organizationId));
@@ -513,7 +518,7 @@ namespace WebsitePanel.Providers.HostedSolution
var expirationDate = pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
- if (pwdLastSetDate > expirationDate.AddDays(-daysBeforeExpiration))
+ if (expirationDate.AddDays(-daysBeforeExpiration) < DateTime.Now)
{
var user = new OrganizationUser();
@@ -866,9 +871,22 @@ namespace WebsitePanel.Providers.HostedSolution
retUser.UserPrincipalName = (string)entry.InvokeGet(ADAttributes.UserPrincipalName);
retUser.UserMustChangePassword = GetUserMustChangePassword(entry);
+ retUser.PasswordExpirationDateTime = GetPasswordExpirationDate(entry);
+
return retUser;
}
+ private DateTime GetPasswordExpirationDate(DirectoryEntry entry)
+ {
+ var maxPasswordAgeSpan = GetMaxPasswordAge();
+
+ var pwdLastSetTicks = ConvertADSLargeIntegerToInt64(entry.Properties[ADAttributes.PwdLastSet].Value);
+
+ var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
+
+ return pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
+ }
+
private string GetDomainName(string username)
{
string domain = ActiveDirectoryUtils.GetNETBIOSDomainName(RootDomain);
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordResetLetter.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordResetLetter.ascx.resx
new file mode 100644
index 00000000..d0758d63
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/SettingsUserPasswordResetLetter.ascx.resx
@@ -0,0 +1,153 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ High
+
+
+ Low
+
+
+ Normal
+
+
+ From:
+
+
+ HTML Body:
+
+
+ Logo Url:
+
+
+ No Changes HTML Body:
+
+
+ No Changes Text Body:
+
+
+ Priority:
+
+
+ Subject:
+
+
+ Text Body:
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
index 1ea4b782..cedcfc35 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/App_LocalResources/UserAccountMailTemplateSettings.ascx.resx
@@ -151,6 +151,9 @@
RDS Setup Letter
- User Password Expiration Letter
+ Organization User Password Expiration Letter
+
+
+ Organization User Password Reset Letter
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
index 521750a1..adb7dc30 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/App_LocalResources/OrganizationUserResetPassword.ascx.resx
@@ -118,7 +118,7 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- Sent Password Reset Email
+ Send Password Reset Email
Email:
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
index b49be890..7da8a076 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserResetPassword.ascx
@@ -36,7 +36,7 @@
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx
new file mode 100644
index 00000000..48251fb0
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx
@@ -0,0 +1,45 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SettingsUserPasswordResetLetter.ascx.cs" Inherits="WebsitePanel.Portal.SettingsUserPasswordResetLetter" %>
+
+
+
+
+ |
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ High
+ Normal
+ Low
+
+ |
+
+
+ |
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
|
+
+
+
+ |
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.cs
new file mode 100644
index 00000000..12cb669b
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.cs
@@ -0,0 +1,33 @@
+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 SettingsUserPasswordResetLetter : 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"];
+ }
+
+ 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;
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.designer.cs
new file mode 100644
index 00000000..84c322e1
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/SettingsUserPasswordResetLetter.ascx.designer.cs
@@ -0,0 +1,123 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal {
+
+
+ public partial class SettingsUserPasswordResetLetter {
+
+ ///
+ /// lblFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblFrom;
+
+ ///
+ /// txtFrom control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtFrom;
+
+ ///
+ /// lblSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblSubject;
+
+ ///
+ /// txtSubject control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSubject;
+
+ ///
+ /// lblPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPriority;
+
+ ///
+ /// ddlPriority control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.DropDownList ddlPriority;
+
+ ///
+ /// lblLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblLogoUrl;
+
+ ///
+ /// txtLogoUrl control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtLogoUrl;
+
+ ///
+ /// lblHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblHtmlBody;
+
+ ///
+ /// txtHtmlBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtHtmlBody;
+
+ ///
+ /// lblTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblTextBody;
+
+ ///
+ /// txtTextBody control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtTextBody;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
index 9df60dfc..f74b84f9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/UserAccountMailTemplateSettings.ascx
@@ -46,6 +46,10 @@
+
+
+
@@ -34,8 +35,8 @@
@{
if (WspContext.User != null)
{
-
- @WspContext.User.Login
+
+ @WspContext.User.Login
}
}
@@ -65,9 +66,9 @@
@Scripts.Render("~/bundles/authScripts")
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
index 21db106b..67af8355 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/WebsitePanel.WebDavPortal.csproj
@@ -165,13 +165,15 @@
-
+
+
+
@@ -188,9 +190,12 @@
+
+
+
@@ -198,6 +203,7 @@
+
@@ -208,6 +214,11 @@
+
+ True
+ True
+ Messages.resx
+
True
True
@@ -380,6 +391,7 @@
+
@@ -465,6 +477,10 @@
+
+
+
+
@@ -481,6 +497,10 @@
+
+ PublicResXFileCodeGenerator
+ Messages.Designer.cs
+
PublicResXFileCodeGenerator
UI.Designer.cs
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
index 490b50b0..b9b15589 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_GlobalResources/WebsitePanel_SharedResources.ascx.resx
@@ -5716,4 +5716,7 @@
Error during updating settings.
+
+ Unable to load password settings
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
index 20d3049f..84e1404d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/ExchangeCreateMailbox.ascx.cs
@@ -129,24 +129,7 @@ namespace WebsitePanel.Portal.ExchangeServer
}
else
{
- password.SetPackagePolicy(PanelSecurity.PackageId, UserSettings.EXCHANGE_POLICY, "MailboxPasswordPolicy");
-
- PasswordPolicyResult passwordPolicy = ES.Services.Organizations.GetPasswordPolicy(PanelRequest.ItemID);
-
- if (passwordPolicy.IsSuccess)
- {
- password.MinimumLength = passwordPolicy.Value.MinLength;
- if (passwordPolicy.Value.IsComplexityEnable)
- {
- password.MinimumNumbers = 1;
- password.MinimumSymbols = 1;
- password.MinimumUppercase = 1;
- }
- }
- else
- {
- messageBox.ShowMessage(passwordPolicy, "CREATE_ORGANIZATION_USER", "HostedOrganization");
- }
+ messageBox.ShowErrorMessage("UNABLETOLOADPASSWORDSETTINGS");
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
index 11f190db..217ac7f0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationCreateUser.ascx.cs
@@ -82,24 +82,7 @@ namespace WebsitePanel.Portal.HostedSolution
}
else
{
- password.SetPackagePolicy(PanelSecurity.PackageId, UserSettings.EXCHANGE_POLICY, "MailboxPasswordPolicy");
-
- PasswordPolicyResult passwordPolicy = ES.Services.Organizations.GetPasswordPolicy(PanelRequest.ItemID);
-
- if (passwordPolicy.IsSuccess)
- {
- password.MinimumLength = passwordPolicy.Value.MinLength;
- if (passwordPolicy.Value.IsComplexityEnable)
- {
- password.MinimumNumbers = 1;
- password.MinimumSymbols = 1;
- password.MinimumUppercase = 1;
- }
- }
- else
- {
- messageBox.ShowMessage(passwordPolicy, "CREATE_ORGANIZATION_USER", "HostedOrganization");
- }
+ messageBox.ShowErrorMessage("UNABLETOLOADPASSWORDSETTINGS");
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
index 7eed531f..c4baf96b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ExchangeServer/OrganizationUserGeneralSettings.ascx.cs
@@ -272,24 +272,7 @@ namespace WebsitePanel.Portal.HostedSolution
}
else
{
- password.SetPackagePolicy(PanelSecurity.PackageId, UserSettings.EXCHANGE_POLICY, "MailboxPasswordPolicy");
-
- PasswordPolicyResult passwordPolicy = ES.Services.Organizations.GetPasswordPolicy(PanelRequest.ItemID);
-
- if (passwordPolicy.IsSuccess)
- {
- password.MinimumLength = passwordPolicy.Value.MinLength;
- if (passwordPolicy.Value.IsComplexityEnable)
- {
- password.MinimumNumbers = 1;
- password.MinimumSymbols = 1;
- password.MinimumUppercase = 1;
- }
- }
- else
- {
- messageBox.ShowMessage(passwordPolicy, "CREATE_ORGANIZATION_USER", "HostedOrganization");
- }
+ messageBox.ShowErrorMessage("UNABLETOLOADPASSWORDSETTINGS");
}
}
From 599e9a8865fd5783cc35d19a5bd43d9da444a298 Mon Sep 17 00:00:00 2001
From: vfedosevich
Date: Tue, 14 Apr 2015 00:40:11 -0700
Subject: [PATCH 07/38] webdav portal password reset added
---
WebsitePanel/Database/update_db.sql | 33 ++-
.../HostedSolution/AccessToken.cs | 6 +-
.../OrganizationProxy.cs | 172 +++++++++++
.../Data/DataProvider.cs | 24 +-
.../HostedSolution/OrganizationController.cs | 14 +-
.../esOrganizations.asmx.cs | 19 ++
.../OrganizationProvider.cs | 270 ++++++++++++------
.../Config/Entities/SessionKeysCollection.cs | 10 +
.../Config/Entities/TwilioParameters.cs | 16 ++
.../Config/IWebDavAppConfig.cs | 1 +
.../WebConfigSections/SessionKeysElement.cs | 1 +
.../Config/WebConfigSections/TwilioElement.cs | 32 +++
...DavExplorerConfigurationSettingsSection.cs | 8 +
.../Config/WebDavAppConfigManager.cs | 2 +
.../Security/ISmsAuthenticationService.cs | 11 +
.../Services/ISmsDistributionService.cs | 9 +
.../SmsAuthenticationService.cs | 46 +++
.../Services/TwillioSmsDistributionService.cs | 27 ++
.../WebsitePanel.WebDav.Core.csproj | 13 +
.../WebsitePanel.WebDav.Core/packages.config | 2 +
.../App_Start/RouteConfig.cs | 24 ++
.../App_Start/Routes/AccountRouteNames.cs | 4 +
.../Content/Site.css | 3 +
.../Controllers/AccountController.cs | 160 ++++++++++-
.../OrganizationPasswordPolicyAttribute.cs | 19 +-
.../DependencyInjection/PortalDependencies.cs | 4 +
.../Models/Account/PasswordResetEmailModel.cs | 14 +
.../Models/Account/PasswordResetSmsModel.cs | 12 +
.../Common/EditorTemplates/PasswordEditor.cs | 2 +-
.../Resources/Messages.Designer.cs | 54 ++++
.../Resources/Messages.resx | 18 ++
.../Resources/UI.Designer.cs | 45 +++
.../Resources/UI.resx | 15 +
.../Scripts/_references.js | 36 ++-
.../Views/Account/Login.cshtml | 5 +-
.../Views/Account/PasswordResetEmail.cshtml | 31 ++
.../Account/PasswordResetEmailSent.cshtml | 14 +
.../Account/PasswordResetFinalStep.cshtml | 27 ++
.../Views/Account/PasswordResetSms.cshtml | 38 +++
.../Views/Shared/_Layout.cshtml | 3 +-
.../WebsitePanel.WebDavPortal/Web.config | 16 +-
.../WebsitePanel.WebDavPortal.csproj | 6 +
...nizationSettingsPasswordSettings.ascx.resx | 2 +-
.../ExchangeServer/OrganizationHome.ascx | 2 +-
.../OrganizationSettingsPasswordSettings.ascx | 2 +-
.../PasswordPolicyEditor.ascx.resx | 2 +-
.../UserControls/PasswordPolicyEditor.ascx | 2 +-
.../WebsitePanel.Portal.Modules.csproj | 4 +-
48 files changed, 1163 insertions(+), 117 deletions(-)
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/TwilioParameters.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/TwilioElement.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/ISmsAuthenticationService.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Services/ISmsDistributionService.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/SmsAuthenticationService.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDav.Core/Services/TwillioSmsDistributionService.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetEmailModel.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetSmsModel.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmail.cshtml
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmailSent.cshtml
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetFinalStep.cshtml
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetSms.cshtml
diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index 09db0c57..3fb95e49 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -9726,7 +9726,8 @@ CREATE TABLE AccessTokens
ExpirationDate DATETIME NOT NULL,
AccountID INT NOT NULL ,
ItemId INT NOT NULL,
- TokenType INT NOT NULL
+ TokenType INT NOT NULL,
+ SmsResponse varchar(100)
)
GO
@@ -9771,6 +9772,33 @@ RETURN
GO
+IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'SetAccessTokenSmsResponse')
+DROP PROCEDURE SetAccessTokenSmsResponse
+GO
+CREATE PROCEDURE [dbo].[SetAccessTokenSmsResponse]
+(
+ @AccessToken UNIQUEIDENTIFIER,
+ @SmsResponse varchar(100)
+)
+AS
+UPDATE [dbo].[AccessTokens] SET [SmsResponse] = @SmsResponse WHERE [AccessTokenGuid] = @AccessToken
+RETURN
+GO
+
+IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteAccessToken')
+DROP PROCEDURE DeleteAccessToken
+GO
+CREATE PROCEDURE [dbo].[DeleteAccessToken]
+(
+ @AccessToken UNIQUEIDENTIFIER,
+ @TokenType INT
+)
+AS
+DELETE FROM AccessTokens
+WHERE AccessTokenGuid = @AccessToken AND TokenType = @TokenType
+GO
+
+
IF EXISTS (SELECT * FROM SYS.OBJECTS WHERE type = 'P' AND name = 'DeleteExpiredAccessTokenTokens')
DROP PROCEDURE DeleteExpiredAccessTokenTokens
GO
@@ -9796,7 +9824,8 @@ SELECT
ExpirationDate,
AccountID,
ItemId,
- TokenType
+ TokenType,
+ SmsResponse
FROM AccessTokens
Where AccessTokenGuid = @AccessToken AND ExpirationDate > getdate() AND TokenType = @TokenType
GO
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/AccessToken.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/AccessToken.cs
index cbb4bf8b..9556d1c3 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/AccessToken.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/HostedSolution/AccessToken.cs
@@ -9,6 +9,10 @@ namespace WebsitePanel.EnterpriseServer.Base.HostedSolution
public DateTime ExpirationDate { get; set; }
public int AccountId { get; set; }
public int ItemId { get; set; }
- public AccessTokenTypes Type { get; set; }
+ public AccessTokenTypes TokenType { get; set; }
+ public string SmsResponse { get; set; }
+ public bool IsSmsSent {
+ get { return !string.IsNullOrEmpty(SmsResponse); }
+ }
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs
index 8cb893f1..92f24a94 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Client/OrganizationProxy.cs
@@ -18,6 +18,7 @@ using WebsitePanel.Providers.Common;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.Providers.ResultObjects;
+
namespace WebsitePanel.EnterpriseServer.HostedSolution {
using System.Xml.Serialization;
using System.Web.Services;
@@ -36,6 +37,12 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
[System.Xml.Serialization.XmlIncludeAttribute(typeof(ServiceProviderItem))]
public partial class esOrganizations : Microsoft.Web.Services3.WebServicesClientProtocol {
+ private System.Threading.SendOrPostCallback DeletePasswordresetAccessTokenOperationCompleted;
+
+ private System.Threading.SendOrPostCallback SetAccessTokenResponseOperationCompleted;
+
+ private System.Threading.SendOrPostCallback GetPasswordresetAccessTokenOperationCompleted;
+
private System.Threading.SendOrPostCallback UpdateOrganizationGeneralSettingsOperationCompleted;
private System.Threading.SendOrPostCallback GetOrganizationGeneralSettingsOperationCompleted;
@@ -153,6 +160,15 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
this.Url = "http://localhost:9002/esOrganizations.asmx";
}
+ ///
+ public event DeletePasswordresetAccessTokenCompletedEventHandler DeletePasswordresetAccessTokenCompleted;
+
+ ///
+ public event SetAccessTokenResponseCompletedEventHandler SetAccessTokenResponseCompleted;
+
+ ///
+ public event GetPasswordresetAccessTokenCompletedEventHandler GetPasswordresetAccessTokenCompleted;
+
///
public event UpdateOrganizationGeneralSettingsCompletedEventHandler UpdateOrganizationGeneralSettingsCompleted;
@@ -321,6 +337,128 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
///
public event GetSupportServiceLevelCompletedEventHandler GetSupportServiceLevelCompleted;
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/DeletePasswordresetAccessToken", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void DeletePasswordresetAccessToken(System.Guid accessToken) {
+ this.Invoke("DeletePasswordresetAccessToken", new object[] {
+ accessToken});
+ }
+
+ ///
+ public System.IAsyncResult BeginDeletePasswordresetAccessToken(System.Guid accessToken, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("DeletePasswordresetAccessToken", new object[] {
+ accessToken}, callback, asyncState);
+ }
+
+ ///
+ public void EndDeletePasswordresetAccessToken(System.IAsyncResult asyncResult) {
+ this.EndInvoke(asyncResult);
+ }
+
+ ///
+ public void DeletePasswordresetAccessTokenAsync(System.Guid accessToken) {
+ this.DeletePasswordresetAccessTokenAsync(accessToken, null);
+ }
+
+ ///
+ public void DeletePasswordresetAccessTokenAsync(System.Guid accessToken, object userState) {
+ if ((this.DeletePasswordresetAccessTokenOperationCompleted == null)) {
+ this.DeletePasswordresetAccessTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeletePasswordresetAccessTokenOperationCompleted);
+ }
+ this.InvokeAsync("DeletePasswordresetAccessToken", new object[] {
+ accessToken}, this.DeletePasswordresetAccessTokenOperationCompleted, userState);
+ }
+
+ private void OnDeletePasswordresetAccessTokenOperationCompleted(object arg) {
+ if ((this.DeletePasswordresetAccessTokenCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.DeletePasswordresetAccessTokenCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/SetAccessTokenResponse", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public void SetAccessTokenResponse(System.Guid accessToken, string response) {
+ this.Invoke("SetAccessTokenResponse", new object[] {
+ accessToken,
+ response});
+ }
+
+ ///
+ public System.IAsyncResult BeginSetAccessTokenResponse(System.Guid accessToken, string response, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("SetAccessTokenResponse", new object[] {
+ accessToken,
+ response}, callback, asyncState);
+ }
+
+ ///
+ public void EndSetAccessTokenResponse(System.IAsyncResult asyncResult) {
+ this.EndInvoke(asyncResult);
+ }
+
+ ///
+ public void SetAccessTokenResponseAsync(System.Guid accessToken, string response) {
+ this.SetAccessTokenResponseAsync(accessToken, response, null);
+ }
+
+ ///
+ public void SetAccessTokenResponseAsync(System.Guid accessToken, string response, object userState) {
+ if ((this.SetAccessTokenResponseOperationCompleted == null)) {
+ this.SetAccessTokenResponseOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetAccessTokenResponseOperationCompleted);
+ }
+ this.InvokeAsync("SetAccessTokenResponse", new object[] {
+ accessToken,
+ response}, this.SetAccessTokenResponseOperationCompleted, userState);
+ }
+
+ private void OnSetAccessTokenResponseOperationCompleted(object arg) {
+ if ((this.SetAccessTokenResponseCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.SetAccessTokenResponseCompleted(this, new System.ComponentModel.AsyncCompletedEventArgs(invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
+ ///
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetPasswordresetAccessToken", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
+ public AccessToken GetPasswordresetAccessToken(System.Guid token) {
+ object[] results = this.Invoke("GetPasswordresetAccessToken", new object[] {
+ token});
+ return ((AccessToken)(results[0]));
+ }
+
+ ///
+ public System.IAsyncResult BeginGetPasswordresetAccessToken(System.Guid token, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("GetPasswordresetAccessToken", new object[] {
+ token}, callback, asyncState);
+ }
+
+ ///
+ public AccessToken EndGetPasswordresetAccessToken(System.IAsyncResult asyncResult) {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((AccessToken)(results[0]));
+ }
+
+ ///
+ public void GetPasswordresetAccessTokenAsync(System.Guid token) {
+ this.GetPasswordresetAccessTokenAsync(token, null);
+ }
+
+ ///
+ public void GetPasswordresetAccessTokenAsync(System.Guid token, object userState) {
+ if ((this.GetPasswordresetAccessTokenOperationCompleted == null)) {
+ this.GetPasswordresetAccessTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetPasswordresetAccessTokenOperationCompleted);
+ }
+ this.InvokeAsync("GetPasswordresetAccessToken", new object[] {
+ token}, this.GetPasswordresetAccessTokenOperationCompleted, userState);
+ }
+
+ private void OnGetPasswordresetAccessTokenOperationCompleted(object arg) {
+ if ((this.GetPasswordresetAccessTokenCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.GetPasswordresetAccessTokenCompleted(this, new GetPasswordresetAccessTokenCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+
///
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/UpdateOrganizationGeneralSettings", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public void UpdateOrganizationGeneralSettings(int itemId, OrganizationGeneralSettings settings) {
@@ -3122,6 +3260,40 @@ namespace WebsitePanel.EnterpriseServer.HostedSolution {
}
}
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ public delegate void DeletePasswordresetAccessTokenCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ public delegate void SetAccessTokenResponseCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ public delegate void GetPasswordresetAccessTokenCompletedEventHandler(object sender, GetPasswordresetAccessTokenCompletedEventArgs e);
+
+ ///
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.ComponentModel.DesignerCategoryAttribute("code")]
+ public partial class GetPasswordresetAccessTokenCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal GetPasswordresetAccessTokenCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ ///
+ public AccessToken Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((AccessToken)(this.results[0]));
+ }
+ }
+ }
+
///
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.3038")]
public delegate void UpdateOrganizationGeneralSettingsCompletedEventHandler(object sender, System.ComponentModel.AsyncCompletedEventArgs e);
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs
index a9ee96ac..f1975f10 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Data/DataProvider.cs
@@ -3192,7 +3192,7 @@ namespace WebsitePanel.EnterpriseServer
public static int AddAccessToken(AccessToken token)
{
- return AddAccessToken(token.AccessTokenGuid, token.AccountId, token.ItemId, token.ExpirationDate, token.Type);
+ return AddAccessToken(token.AccessTokenGuid, token.AccountId, token.ItemId, token.ExpirationDate, token.TokenType);
}
public static int AddAccessToken(Guid accessToken, int accountId, int itemId, DateTime expirationDate, AccessTokenTypes type)
@@ -3216,6 +3216,17 @@ namespace WebsitePanel.EnterpriseServer
return Convert.ToInt32(prmId.Value);
}
+ public static void SetAccessTokenResponseMessage(Guid accessToken, string response)
+ {
+ SqlHelper.ExecuteNonQuery(
+ ConnectionString,
+ CommandType.StoredProcedure,
+ "SetAccessTokenSmsResponse",
+ new SqlParameter("@AccessToken", accessToken),
+ new SqlParameter("@SmsResponse", response)
+ );
+ }
+
public static void DeleteExpiredAccessTokens()
{
SqlHelper.ExecuteNonQuery(
@@ -3236,6 +3247,17 @@ namespace WebsitePanel.EnterpriseServer
);
}
+ public static void DeleteAccessToken(Guid accessToken, AccessTokenTypes type)
+ {
+ SqlHelper.ExecuteNonQuery(
+ ConnectionString,
+ CommandType.StoredProcedure,
+ "DeleteAccessToken",
+ new SqlParameter("@AccessToken", accessToken),
+ new SqlParameter("@TokenType", type)
+ );
+ }
+
public static void UpdateOrganizationSettings(int itemId, string settingsName, string xml)
{
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index 733a4642..c3923871 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1625,6 +1625,11 @@ namespace WebsitePanel.EnterpriseServer
return ObjectUtils.FillObjectFromDataReader(DataProvider.GetAccessTokenByAccessToken(accessToken, type));
}
+ public static void DeleteAccessToken(Guid accessToken, AccessTokenTypes type)
+ {
+ DataProvider.DeleteAccessToken(accessToken, type);
+ }
+
public static void DeleteAllExpiredTokens()
{
DataProvider.DeleteExpiredAccessTokens();
@@ -1632,7 +1637,7 @@ namespace WebsitePanel.EnterpriseServer
private static string GenerateUserPasswordResetLink(int itemId, int accountId)
{
- string passwordResetUrlFormat = "account/password-reset";
+ string passwordResetUrlFormat = "account/password-reset/step-2";
var settings = SystemController.GetSystemSettings(SystemSettings.WEBDAV_PORTAL_SETTINGS);
@@ -1656,7 +1661,7 @@ namespace WebsitePanel.EnterpriseServer
AccessTokenGuid = Guid.NewGuid(),
ItemId = itemId,
AccountId = accountId,
- Type = type,
+ TokenType = type,
ExpirationDate = DateTime.Now.AddHours(12)
};
@@ -1665,6 +1670,11 @@ namespace WebsitePanel.EnterpriseServer
return token;
}
+ public static void SetAccessTokenResponse(Guid accessToken, string response)
+ {
+ DataProvider.SetAccessTokenResponseMessage(accessToken, response);
+ }
+
public static void UpdateOrganizationPasswordSettings(int itemId, OrganizationPasswordSettings settings)
{
TaskManager.StartTask("ORGANIZATION", "UPDATE_PASSWORD_SETTINGS");
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs
index e26cd9f3..50080c76 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer/esOrganizations.asmx.cs
@@ -26,6 +26,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -47,6 +48,24 @@ namespace WebsitePanel.EnterpriseServer
{
#region Organizations
+ [WebMethod]
+ public void DeletePasswordresetAccessToken(Guid accessToken)
+ {
+ OrganizationController.DeleteAccessToken(accessToken, AccessTokenTypes.PasswrodReset);
+ }
+
+ [WebMethod]
+ public void SetAccessTokenResponse(Guid accessToken, string response)
+ {
+ OrganizationController.SetAccessTokenResponse(accessToken, response);
+ }
+
+ [WebMethod]
+ public AccessToken GetPasswordresetAccessToken(Guid token)
+ {
+ return OrganizationController.GetAccessToken(token, AccessTokenTypes.PasswrodReset);
+ }
+
[WebMethod]
public void UpdateOrganizationGeneralSettings(int itemId, OrganizationGeneralSettings settings)
{
diff --git a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
index 752509c1..7781540b 100644
--- a/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
+++ b/WebsitePanel/Sources/WebsitePanel.Providers.HostedSolution/OrganizationProvider.cs
@@ -395,11 +395,28 @@ namespace WebsitePanel.Providers.HostedSolution
throw new ArgumentNullException("organizationId");
string groupPath = GetGroupPath(organizationId);
+ string psoName = FormOrganizationPSOName(organizationId);
+ Runspace runspace = null;
+
try
{
+ runspace = OpenRunspace();
+
+ if (FineGrainedPasswordPolicyExist(runspace, psoName))
+ {
+ RemoveFineGrainedPasswordPolicy(runspace, psoName);
+ }
+
ActiveDirectoryUtils.DeleteADObject(groupPath);
}
- catch { /* skip */ }
+ catch
+ {
+ /* skip */
+ }
+ finally
+ {
+ CloseRunspace(runspace);
+ }
string path = GetOrganizationPath(organizationId);
ActiveDirectoryUtils.DeleteADObject(path, true);
@@ -495,45 +512,75 @@ namespace WebsitePanel.Providers.HostedSolution
return result;
}
- var maxPasswordAgeSpan = GetMaxPasswordAge();
+ Runspace runspace = null;
- var searchRoot = new DirectoryEntry(GetOrganizationPath(organizationId));
-
- var search = new DirectorySearcher(searchRoot)
+ try
{
- SearchScope = SearchScope.Subtree,
- Filter = "(objectClass=user)"
- };
+ runspace = OpenRunspace();
- search.PropertiesToLoad.Add("pwdLastSet");
- search.PropertiesToLoad.Add("sAMAccountName");
+ var psoName = FormOrganizationPSOName(organizationId);
- SearchResultCollection searchResults = search.FindAll();
+ var maxPasswordAgeSpan = GetMaxPasswordAge(runspace, psoName);
- foreach (SearchResult searchResult in searchResults)
- {
- var pwdLastSetTicks = (long)searchResult.Properties["pwdLastSet"][0];
+ var searchRoot = new DirectoryEntry(GetOrganizationPath(organizationId));
- var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
-
- var expirationDate = pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
-
- if (expirationDate.AddDays(-daysBeforeExpiration) < DateTime.Now)
+ var search = new DirectorySearcher(searchRoot)
{
- var user = new OrganizationUser();
+ SearchScope = SearchScope.Subtree,
+ Filter = "(objectClass=user)"
+ };
- user.PasswordExpirationDateTime = expirationDate;
- user.SamAccountName = (string)searchResult.Properties["sAMAccountName"][0];
+ search.PropertiesToLoad.Add("pwdLastSet");
+ search.PropertiesToLoad.Add("sAMAccountName");
- result.Add(user);
+ SearchResultCollection searchResults = search.FindAll();
+
+ foreach (SearchResult searchResult in searchResults)
+ {
+ var pwdLastSetTicks = (long) searchResult.Properties["pwdLastSet"][0];
+
+ var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
+
+ var expirationDate = pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
+
+ if (expirationDate.AddDays(-daysBeforeExpiration) < DateTime.Now)
+ {
+ var user = new OrganizationUser();
+
+ user.PasswordExpirationDateTime = expirationDate;
+ user.SamAccountName = (string) searchResult.Properties["sAMAccountName"][0];
+
+ result.Add(user);
+ }
}
}
+ catch (Exception)
+ {
+ throw;
+ }
+ finally
+ {
+ CloseRunspace(runspace);
+ }
return result;
}
- internal TimeSpan GetMaxPasswordAge()
+ internal TimeSpan GetMaxPasswordAge(Runspace runspace, string psoName)
{
+ if (FineGrainedPasswordPolicyExist(runspace, psoName))
+ {
+ var psoObject = GetFineGrainedPasswordPolicy(runspace, psoName);
+
+ var span = GetPSObjectProperty(psoObject, "MaxPasswordAge") as TimeSpan?;
+
+ if (span != null)
+ {
+ return span.Value;
+ }
+ }
+
+
using (Domain d = Domain.GetCurrentDomain())
{
using (DirectoryEntry domain = d.GetDirectoryEntry())
@@ -563,11 +610,26 @@ namespace WebsitePanel.Providers.HostedSolution
Runspace runspace = null;
+ var psoName = FormOrganizationPSOName(organizationId);
+
try
{
runspace = OpenRunspace();
- var gpoId = CreatePolicyIfNotExist(runspace, organizationId, FormOrganizationSettingsGpoName(organizationId));
+ if (!FineGrainedPasswordPolicyExist(runspace, psoName))
+ {
+ CreateFineGrainedPasswordPolicy(runspace, organizationId, psoName, settings);
+
+ string groupPath = GetGroupPath(organizationId);
+
+ SetFineGrainedPasswordPolicySubject(runspace, groupPath, psoName);
+ }
+ else
+ {
+ UpdateFineGrainedPasswordPolicy(runspace, psoName, settings);
+
+ RemoveFineGrainedPasswordPolicy(runspace, psoName);
+ }
}
catch (Exception ex)
{
@@ -581,88 +643,108 @@ namespace WebsitePanel.Providers.HostedSolution
}
}
- private string FormOrganizationSettingsGpoName(string organizationId)
+ private string FormOrganizationPSOName(string organizationId)
{
- return string.Format("{0}-settings", organizationId);
+ return string.Format("{0}-PSO", organizationId);
}
- private string CreatePolicyIfNotExist(Runspace runspace, string organizationId, string gpoName)
+ private bool FineGrainedPasswordPolicyExist(Runspace runspace, string psoName)
{
- string gpoId = GetPolicyId(runspace, gpoName);
-
- if (string.IsNullOrEmpty(gpoId))
+ try
{
- gpoId = CreateAndLinkPolicy(runspace, gpoName, organizationId);
+ var cmd = new Command("Get-ADFineGrainedPasswordPolicy");
+ cmd.Parameters.Add("Identity", psoName);
+
+ var result = ExecuteShellCommand(runspace, cmd);
+ }
+ catch (Exception e)
+ {
+ return false;
}
- return gpoId;
+ return true;
}
- private void DeleteGpo(Runspace runspace, string gpoName)
+ private PSObject GetFineGrainedPasswordPolicy(Runspace runspace, string psoName)
{
- Command cmd = new Command("Remove-GPO");
- cmd.Parameters.Add("Name", gpoName);
+ var cmd = new Command("Get-ADFineGrainedPasswordPolicy");
+ cmd.Parameters.Add("Identity", psoName);
- // Collection result = ExecuteRemoteShellCommand(runspace, PrimaryDomainController, cmd);
+ return ExecuteShellCommand(runspace, cmd).FirstOrDefault();
}
- private string CreateAndLinkPolicy(Runspace runspace, string gpoName, string organizationId)
+ private void CreateFineGrainedPasswordPolicy(Runspace runspace, string organizationId, string psoName, OrganizationPasswordSettings settings)
{
- string pathOU = GetOrganizationTargetPath(organizationId);
-
- //create new gpo
- Command cmd = new Command("New-GPO");
- cmd.Parameters.Add("Name", gpoName);
-
- Collection result = ExecuteShellCommand(runspace, cmd);
-
- string gpoId = null;
-
- if (result != null && result.Count > 0)
+ var cmd = new Command("New-ADFineGrainedPasswordPolicy");
+ cmd.Parameters.Add("Name", psoName);
+ cmd.Parameters.Add("Description", string.Format("The {0} Password Policy", organizationId));
+ cmd.Parameters.Add("Precedence", 50);
+ cmd.Parameters.Add("MinPasswordLength", settings.MinimumLength);
+ cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
+ cmd.Parameters.Add("ComplexityEnabled", false);
+ cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
+
+ if (settings.LockoutSettingsEnabled)
{
- PSObject gpo = result[0];
- //get gpo id
- gpoId = ((Guid) GetPSObjectProperty(gpo, "Id")).ToString("B");
-
+ cmd.Parameters.Add("LockoutDuration", new TimeSpan(0, settings.AccountLockoutDuration, 0));
+ cmd.Parameters.Add("LockoutThreshold", settings.AccountLockoutThreshold);
+ cmd.Parameters.Add("LockoutObservationWindow", settings.ResetAccountLockoutCounterAfter);
}
- //create gpo link
- cmd = new Command("New-GPLink");
- cmd.Parameters.Add("Name", gpoName);
- cmd.Parameters.Add("Target", pathOU);
+ ExecuteShellCommand(runspace, cmd);
+ }
+
+ private void SetFineGrainedPasswordPolicySubject(Runspace runspace, string subjectPath, string psoName)
+ {
+ var entry = new DirectoryEntry(subjectPath);
+
+ var cmd = new Command("Add-ADFineGrainedPasswordPolicySubject");
+ cmd.Parameters.Add("Identity", psoName);
+ cmd.Parameters.Add("Subjects", entry.Properties[ADAttributes.SAMAccountName].Value.ToString());
ExecuteShellCommand(runspace, cmd);
- return gpoId;
+ cmd = new Command("Set-ADGroup");
+ cmd.Parameters.Add("Identity", entry.Properties[ADAttributes.SAMAccountName].Value.ToString());
+ cmd.Parameters.Add("GroupScope", "Global");
+
+ ExecuteShellCommand(runspace, cmd);
}
- private string GetPolicyId(Runspace runspace, string gpoName)
+ private void UpdateFineGrainedPasswordPolicy(Runspace runspace, string psoName, OrganizationPasswordSettings settings)
{
- Runspace runSpace = null;
+ var cmd = new Command("Set-ADFineGrainedPasswordPolicy");
+ cmd.Parameters.Add("Identity", psoName);
+ cmd.Parameters.Add("MinPasswordLength", settings.MinimumLength);
+ cmd.Parameters.Add("PasswordHistoryCount", settings.EnforcePasswordHistory);
+ cmd.Parameters.Add("ComplexityEnabled", false);
+ cmd.Parameters.Add("ReversibleEncryptionEnabled", false);
- string gpoId = null;
-
- try
+ if (settings.LockoutSettingsEnabled)
{
- runSpace = OpenRunspace();
-
- Command cmd = new Command("Get-GPO");
- cmd.Parameters.Add("Name", gpoName);
-
- Collection result = ExecuteShellCommand(runSpace, cmd);
-
- if (result != null && result.Count > 0)
- {
- PSObject gpo = result[0];
- gpoId = ((Guid)GetPSObjectProperty(gpo, "Id")).ToString("B");
- }
+ cmd.Parameters.Add("LockoutDuration", new TimeSpan(0, settings.AccountLockoutDuration, 0));
+ cmd.Parameters.Add("LockoutThreshold", settings.AccountLockoutThreshold);
+ cmd.Parameters.Add("LockoutObservationWindow", settings.ResetAccountLockoutCounterAfter);
}
- finally
+ else
{
- CloseRunspace(runSpace);
+ cmd.Parameters.Add("LockoutDuration", new TimeSpan(0));
+ cmd.Parameters.Add("LockoutThreshold", 0);
+ cmd.Parameters.Add("LockoutObservationWindow", 0);
}
- return gpoId;
+ var result = ExecuteShellCommand(runspace, cmd);
+
+
+ var s = GetFineGrainedPasswordPolicy(runspace, psoName);
+ }
+
+ private void RemoveFineGrainedPasswordPolicy(Runspace runspace, string psoName)
+ {
+ var cmd = new Command("Remove-ADFineGrainedPasswordPolicy");
+ cmd.Parameters.Add("Identity", psoName);
+
+ ExecuteShellCommand(runspace, cmd);
}
public PasswordPolicyResult GetPasswordPolicy()
@@ -782,7 +864,7 @@ namespace WebsitePanel.Providers.HostedSolution
string path = GetUserPath(organizationId, loginName);
- OrganizationUser retUser = GetUser(path);
+ OrganizationUser retUser = GetUser(organizationId, path);
HostedSolutionLog.LogEnd("GetUserGeneralSettingsInternal");
return retUser;
@@ -835,7 +917,7 @@ namespace WebsitePanel.Providers.HostedSolution
user.Properties[ADAttributes.PwdLastSet].Value = userMustChangePassword ? 0 : -1;
}
- private OrganizationUser GetUser(string path)
+ private OrganizationUser GetUser(string organizationId, string path)
{
OrganizationUser retUser = new OrganizationUser();
@@ -871,20 +953,34 @@ namespace WebsitePanel.Providers.HostedSolution
retUser.UserPrincipalName = (string)entry.InvokeGet(ADAttributes.UserPrincipalName);
retUser.UserMustChangePassword = GetUserMustChangePassword(entry);
- retUser.PasswordExpirationDateTime = GetPasswordExpirationDate(entry);
+ var psoName = FormOrganizationPSOName(organizationId);
+
+ retUser.PasswordExpirationDateTime = GetPasswordExpirationDate(psoName, entry);
return retUser;
}
- private DateTime GetPasswordExpirationDate(DirectoryEntry entry)
+ private DateTime GetPasswordExpirationDate(string psoName, DirectoryEntry entry)
{
- var maxPasswordAgeSpan = GetMaxPasswordAge();
+ Runspace runspace = null;
- var pwdLastSetTicks = ConvertADSLargeIntegerToInt64(entry.Properties[ADAttributes.PwdLastSet].Value);
+ try
+ {
+ runspace = OpenRunspace();
- var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
+ var maxPasswordAgeSpan = GetMaxPasswordAge(runspace, psoName);
+
+ var pwdLastSetTicks = ConvertADSLargeIntegerToInt64(entry.Properties[ADAttributes.PwdLastSet].Value);
+
+ var pwdLastSetDate = DateTime.FromFileTimeUtc(pwdLastSetTicks);
+
+ return pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
+ }
+ finally
+ {
+ CloseRunspace(runspace);
+ }
- return pwdLastSetDate.AddDays(maxPasswordAgeSpan.Days);
}
private string GetDomainName(string username)
@@ -1253,7 +1349,7 @@ namespace WebsitePanel.Providers.HostedSolution
foreach (string userPath in ActiveDirectoryUtils.GetGroupObjects(groupName, "user", organizationEntry))
{
- OrganizationUser tmpUser = GetUser(userPath);
+ OrganizationUser tmpUser = GetUser(organizationId, userPath);
members.Add(new ExchangeAccount
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/SessionKeysCollection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/SessionKeysCollection.cs
index 1a45b059..1cbfa2e9 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/SessionKeysCollection.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/SessionKeysCollection.cs
@@ -65,6 +65,16 @@ namespace WebsitePanel.WebDav.Core.Config.Entities
}
}
+ public string PasswordResetSmsKey
+ {
+ get
+ {
+ SessionKeysElement sessionKey =
+ _sessionKeys.FirstOrDefault(x => x.Key == SessionKeysElement.PassswordResetSmsKey);
+ return sessionKey != null ? sessionKey.Value : null;
+ }
+ }
+
public string ResourseRenderCount
{
get
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/TwilioParameters.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/TwilioParameters.cs
new file mode 100644
index 00000000..9ce1ffbe
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/Entities/TwilioParameters.cs
@@ -0,0 +1,16 @@
+namespace WebsitePanel.WebDav.Core.Config.Entities
+{
+ public class TwilioParameters: AbstractConfigCollection
+ {
+ public string AccountSid { get; private set; }
+ public string AuthorizationToken { get; private set; }
+ public string PhoneFrom { get; private set; }
+
+ public TwilioParameters()
+ {
+ AccountSid = ConfigSection.Twilio.AccountSid;
+ AuthorizationToken = ConfigSection.Twilio.AuthorizationToken;
+ PhoneFrom = ConfigSection.Twilio.PhoneFrom;
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs
index 86ce78de..0c72e9c5 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/IWebDavAppConfig.cs
@@ -8,6 +8,7 @@ namespace WebsitePanel.WebDav.Core.Config
string ApplicationName { get; }
ElementsRendering ElementsRendering { get; }
WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; }
+ TwilioParameters TwilioParameters { get; }
SessionKeysCollection SessionKeys { get; }
FileIconsDictionary FileIcons { get; }
HttpErrorsCollection HttpErrors { get; }
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/SessionKeysElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/SessionKeysElement.cs
index 76a0e7e8..efeea291 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/SessionKeysElement.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/SessionKeysElement.cs
@@ -12,6 +12,7 @@ namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
public const string WebDavManagerKey = "WebDavManagerSessionKey";
public const string UserGroupsKey = "UserGroupsKey";
public const string WebDavRootFolderPermissionsKey = "WebDavRootFolderPermissionsKey";
+ public const string PassswordResetSmsKey = "PassswordResetSmsKey";
public const string ResourseRenderCountKey = "ResourseRenderCountSessionKey";
public const string ItemIdSessionKey = "ItemId";
public const string OwaEditFoldersSessionKey = "OwaEditFoldersSession";
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/TwilioElement.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/TwilioElement.cs
new file mode 100644
index 00000000..c53856b6
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/TwilioElement.cs
@@ -0,0 +1,32 @@
+using System.Configuration;
+
+namespace WebsitePanel.WebDav.Core.Config.WebConfigSections
+{
+ public class TwilioElement : ConfigurationElement
+ {
+ private const string AccountSidPropName = "accountSid";
+ private const string AuthorizationTokenPropName = "authorizationToken";
+ private const string PhoneFromPropName = "phoneFrom";
+
+ [ConfigurationProperty(AccountSidPropName, IsKey = true, IsRequired = true)]
+ public string AccountSid
+ {
+ get { return this[AccountSidPropName].ToString(); }
+ set { this[AccountSidPropName] = value; }
+ }
+
+ [ConfigurationProperty(AuthorizationTokenPropName, IsKey = true, IsRequired = true)]
+ public string AuthorizationToken
+ {
+ get { return this[AuthorizationTokenPropName].ToString(); }
+ set { this[AuthorizationTokenPropName] = value; }
+ }
+
+ [ConfigurationProperty(PhoneFromPropName, IsKey = true, IsRequired = true)]
+ public string PhoneFrom
+ {
+ get { return this[PhoneFromPropName].ToString(); }
+ set { this[PhoneFromPropName] = value; }
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs
index d471a912..8edbb92f 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebConfigSections/WebDavExplorerConfigurationSettingsSection.cs
@@ -20,6 +20,7 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
private const string OfficeOnlineKey = "officeOnline";
private const string FilesToIgnoreKey = "filesToIgnore";
private const string TypeOpenerKey = "typeOpener";
+ private const string TwilioKey = "twilio";
public const string SectionName = "webDavExplorerConfigurationSettings";
@@ -65,6 +66,13 @@ namespace WebsitePanel.WebDavPortal.WebConfigSections
set { this[WebsitePanelConstantUserKey] = value; }
}
+ [ConfigurationProperty(TwilioKey, IsRequired = true)]
+ public TwilioElement Twilio
+ {
+ get { return (TwilioElement)this[TwilioKey]; }
+ set { this[TwilioKey] = value; }
+ }
+
[ConfigurationProperty(ElementsRenderingKey, IsRequired = true)]
public ElementsRenderingElement ElementsRendering
{
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs
index 696c1d54..03de83f7 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Config/WebDavAppConfigManager.cs
@@ -21,6 +21,7 @@ namespace WebsitePanel.WebDav.Core.Config
OwaSupportedBrowsers = new OwaSupportedBrowsersCollection();
FilesToIgnore = new FilesToIgnoreCollection();
FileOpener = new OpenerCollection();
+ TwilioParameters = new TwilioParameters();
}
public static WebDavAppConfigManager Instance
@@ -55,6 +56,7 @@ namespace WebsitePanel.WebDav.Core.Config
public ElementsRendering ElementsRendering { get; private set; }
public WebsitePanelConstantUserParameters WebsitePanelConstantUserParameters { get; private set; }
+ public TwilioParameters TwilioParameters { get; private set; }
public SessionKeysCollection SessionKeys { get; private set; }
public FileIconsDictionary FileIcons { get; private set; }
public HttpErrorsCollection HttpErrors { get; private set; }
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/ISmsAuthenticationService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/ISmsAuthenticationService.cs
new file mode 100644
index 00000000..8eb0b563
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Security/ISmsAuthenticationService.cs
@@ -0,0 +1,11 @@
+using System;
+
+namespace WebsitePanel.WebDav.Core.Interfaces.Security
+{
+ public interface ISmsAuthenticationService
+ {
+ bool VerifyResponse(Guid token, string response);
+ string SendRequestMessage(string phoneTo);
+ string GenerateResponse();
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Services/ISmsDistributionService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Services/ISmsDistributionService.cs
new file mode 100644
index 00000000..2d3185ff
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Interfaces/Services/ISmsDistributionService.cs
@@ -0,0 +1,9 @@
+namespace WebsitePanel.WebDav.Core.Interfaces.Services
+{
+ public interface ISmsDistributionService
+ {
+ void SendMessage(string phoneFrom, string phone, string message);
+
+ void SendMessage(string phone, string message);
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/SmsAuthenticationService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/SmsAuthenticationService.cs
new file mode 100644
index 00000000..45771b73
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Security/Authentication/SmsAuthenticationService.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Globalization;
+using WebsitePanel.WebDav.Core.Config;
+using WebsitePanel.WebDav.Core.Interfaces.Security;
+using WebsitePanel.WebDav.Core.Interfaces.Services;
+
+namespace WebsitePanel.WebDav.Core.Security.Authentication
+{
+ public class SmsAuthenticationService : ISmsAuthenticationService
+ {
+ private ISmsDistributionService _smsService;
+
+ public SmsAuthenticationService(ISmsDistributionService smsService)
+ {
+ _smsService = smsService;
+ }
+
+ public bool VerifyResponse( Guid token, string response)
+ {
+ var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
+
+ if (accessToken == null)
+ {
+ return false;
+ }
+
+ return string.Compare(accessToken.SmsResponse, response, StringComparison.InvariantCultureIgnoreCase) == 0;
+ }
+
+ public string SendRequestMessage(string phoneTo)
+ {
+ var response = GenerateResponse();
+
+ _smsService.SendMessage(WebDavAppConfigManager.Instance.TwilioParameters.PhoneFrom, phoneTo, response);
+
+ return response;
+ }
+
+ public string GenerateResponse()
+ {
+ var random = new Random(Guid.NewGuid().GetHashCode());
+
+ return random.Next(10000, 99999).ToString(CultureInfo.InvariantCulture);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Services/TwillioSmsDistributionService.cs b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Services/TwillioSmsDistributionService.cs
new file mode 100644
index 00000000..b764c6e7
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/Services/TwillioSmsDistributionService.cs
@@ -0,0 +1,27 @@
+using Twilio;
+using WebsitePanel.WebDav.Core.Config;
+using WebsitePanel.WebDav.Core.Interfaces.Services;
+
+namespace WebsitePanel.WebDav.Core.Services
+{
+ public class TwillioSmsDistributionService : ISmsDistributionService
+ {
+ private TwilioRestClient _twilioRestClient { get; set; }
+
+ public TwillioSmsDistributionService()
+ {
+ _twilioRestClient = new TwilioRestClient(WebDavAppConfigManager.Instance.TwilioParameters.AccountSid, WebDavAppConfigManager.Instance.TwilioParameters.AuthorizationToken);
+ }
+
+
+ public void SendMessage(string phoneFrom, string phone, string message)
+ {
+ _twilioRestClient.SendSmsMessage(phoneFrom, phone, message);
+ }
+
+ public void SendMessage(string phone, string message)
+ {
+ _twilioRestClient.SendSmsMessage(WebDavAppConfigManager.Instance.TwilioParameters.PhoneFrom, phone, message);
+ }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj
index 67043bd5..1398a59d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/WebsitePanel.WebDav.Core.csproj
@@ -46,6 +46,9 @@
False
..\..\Bin\Microsoft.Web.Services3.dll
+
+ ..\packages\RestSharp.105.0.1\lib\net4\RestSharp.dll
+
@@ -87,6 +90,10 @@
+
+ ..\packages\Twilio.3.6.29\lib\3.5\Twilio.Api.dll
+ True
+
..\..\Bin\WebsitePanel.EnterpriseServer.Base.dll
@@ -108,6 +115,7 @@
+
@@ -126,6 +134,7 @@
+
@@ -149,6 +158,9 @@
+
+
+
@@ -188,6 +200,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config
index ad6a1af2..7188fe00 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebDav.Core/packages.config
@@ -5,4 +5,6 @@
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
index 93bf1f75..3be2e49d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/RouteConfig.cs
@@ -18,6 +18,30 @@ namespace WebsitePanel.WebDavPortal
defaults: new { controller = "Account", action = "UserProfile" }
);
+ routes.MapRoute(
+ name: AccountRouteNames.PasswordResetEmail,
+ url: "account/password-reset/step-1",
+ defaults: new { controller = "Account", action = "PasswordResetEmail" }
+ );
+
+ routes.MapRoute(
+ name: AccountRouteNames.PasswordResetSms,
+ url: "account/password-reset/step-2/{token}",
+ defaults: new { controller = "Account", action = "PasswordResetSms" }
+ );
+
+ routes.MapRoute(
+ name: AccountRouteNames.PasswordResetSendSms,
+ url: "account/password-reset/step-final/{token}",
+ defaults: new { controller = "Account", action = "PasswordResetSendSms" }
+ );
+
+ routes.MapRoute(
+ name: AccountRouteNames.PasswordResetFinalStep,
+ url: "account/password-reset/send-new-sms/{token}",
+ defaults: new { controller = "Account", action = "PasswordResetFinalStep" }
+ );
+
routes.MapRoute(
name: AccountRouteNames.PasswordChange,
url: "account/profile/password-change",
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
index 36f4c562..8a3da848 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/App_Start/Routes/AccountRouteNames.cs
@@ -12,5 +12,9 @@ namespace WebsitePanel.WebDavPortal.UI.Routes
public const string UserProfile = "UserProfileRoute";
public const string PasswordChange = "PasswordChangeRoute";
+ public const string PasswordResetEmail = "PasswordResetEmailRoute";
+ public const string PasswordResetSms = "PasswordResetSmsRoute";
+ public const string PasswordResetSendSms = "PasswordResetSendSmsRoute";
+ public const string PasswordResetFinalStep = "PasswordResetFinalStepRoute";
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css
index 1cbed98d..2173c20a 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Content/Site.css
@@ -230,6 +230,9 @@ tr.selected-file {
color: white;
}
+.forgot-your-password-link {
+ margin-left: 10px;
+}
.navbar-fixed-top #user-profile {
font-size: 18px;
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
index 091e4899..c533cfc2 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System;
+using System.Linq;
using System.Net;
using System.Web.Mvc;
using System.Web.Routing;
@@ -7,6 +8,7 @@ using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.WebDav.Core.Config;
using WebsitePanel.WebDav.Core.Security.Authentication;
using WebsitePanel.WebDav.Core.Security.Cryptography;
+using WebsitePanel.WebDav.Core.Wsp.Framework;
using WebsitePanel.WebDavPortal.CustomAttributes;
using WebsitePanel.WebDavPortal.Models;
using WebsitePanel.WebDavPortal.Models.Account;
@@ -24,16 +26,17 @@ namespace WebsitePanel.WebDavPortal.Controllers
{
private readonly ICryptography _cryptography;
private readonly IAuthenticationService _authenticationService;
+ private readonly ISmsAuthenticationService _smsAuthService;
- public AccountController(ICryptography cryptography, IAuthenticationService authenticationService)
+ public AccountController(ICryptography cryptography, IAuthenticationService authenticationService, ISmsAuthenticationService smsAuthService)
{
_cryptography = cryptography;
_authenticationService = authenticationService;
+ _smsAuthService = smsAuthService;
}
[HttpGet]
[AllowAnonymous]
-
public ActionResult Login()
{
if (WspContext.User != null && WspContext.User.Identity.IsAuthenticated)
@@ -127,6 +130,157 @@ namespace WebsitePanel.WebDavPortal.Controllers
return RedirectToRoute(AccountRouteNames.UserProfile);
}
+ [HttpGet]
+ [AllowAnonymous]
+ public ActionResult PasswordResetEmail()
+ {
+ var model = new PasswordResetEmailModel();
+
+ return View(model);
+ }
+
+ [HttpPost]
+ [AllowAnonymous]
+ public ActionResult PasswordResetEmail(PasswordResetEmailModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ return View(model);
+ }
+
+ var exchangeAccount = WspContext.Services.ExchangeServer.GetAccountByAccountNameWithoutItemId(model.Email);
+
+ if (exchangeAccount == null)
+ {
+ model.AddMessage(MessageType.Error, Resources.Messages.AccountNotFound);
+
+ return View(model);
+ }
+
+ WspContext.Services.Organizations.SendResetUserPasswordEmail(exchangeAccount.ItemId, exchangeAccount.AccountId, Resources.Messages.PasswordResetUserReason, exchangeAccount.PrimaryEmailAddress);
+
+ return View("PasswordResetEmailSent");
+ }
+
+
+ [HttpGet]
+ [AllowAnonymous]
+ public ActionResult PasswordResetSms(Guid token)
+ {
+ var model = new PasswordResetSmsModel();
+
+ var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
+
+ model.IsTokenExist = accessToken != null;
+
+ if (model.IsTokenExist == false)
+ {
+ model.AddMessage(MessageType.Error, Resources.Messages.IncorrectPasswordResetUrl);
+
+ return View(model);
+ }
+
+ if (accessToken.IsSmsSent == false)
+ {
+ var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId, accessToken.AccountId);
+
+ var response = _smsAuthService.SendRequestMessage(user.MobilePhone);
+ WspContext.Services.Organizations.SetAccessTokenResponse(accessToken.AccessTokenGuid, response);
+ }
+
+ return View(model);
+ }
+
+ [HttpPost]
+ [AllowAnonymous]
+ public ActionResult PasswordResetSms(Guid token, PasswordResetSmsModel model)
+ {
+ if (!ModelState.IsValid)
+ {
+ return View(model);
+ }
+
+ if (_smsAuthService.VerifyResponse(token, model.Sms))
+ {
+ var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
+
+ Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] = model.Sms;
+ Session[WebDavAppConfigManager.Instance.SessionKeys.ItemId] = tokenEntity.ItemId;
+
+ return RedirectToRoute(AccountRouteNames.PasswordResetFinalStep);
+ }
+
+ model.AddMessage(MessageType.Error, Resources.Messages.IncorrectSmsResponse);
+
+ return View(model);
+ }
+
+
+ [HttpGet]
+ [AllowAnonymous]
+ public ActionResult PasswordResetFinalStep(Guid token)
+ {
+ var smsResponse = Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] as string;
+
+ if (_smsAuthService.VerifyResponse(token, smsResponse) == false)
+ {
+ return RedirectToRoute(AccountRouteNames.PasswordResetSms);
+ }
+
+ var model = new PasswordEditor();
+
+ return View(model);
+ }
+
+ [HttpPost]
+ [AllowAnonymous]
+ public ActionResult PasswordResetFinalStep(Guid token, PasswordEditor model)
+ {
+ if (!ModelState.IsValid)
+ {
+ return View(model);
+ }
+
+ var smsResponse = Session[WebDavAppConfigManager.Instance.SessionKeys.PasswordResetSmsKey] as string;
+
+ if (_smsAuthService.VerifyResponse(token, smsResponse) == false)
+ {
+ model.AddMessage(MessageType.Error, Resources.Messages.IncorrectSmsResponse);
+
+ return RedirectToRoute(AccountRouteNames.PasswordResetSms);
+ }
+
+ var tokenEntity = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
+
+ WspContext.Services.Organizations.SetUserPassword(
+ tokenEntity.ItemId, tokenEntity.AccountId,
+ model.NewPassword);
+
+ WspContext.Services.Organizations.DeletePasswordresetAccessToken(token);
+
+ return RedirectToRoute(AccountRouteNames.Login);
+ }
+
+ [HttpGet]
+ [AllowAnonymous]
+ public ActionResult PasswordResetSendSms(Guid token)
+ {
+ var accessToken = WspContext.Services.Organizations.GetPasswordresetAccessToken(token);
+
+ if (accessToken == null)
+ {
+ return RedirectToRoute(AccountRouteNames.PasswordResetSms);
+ }
+
+ var user = WspContext.Services.Organizations.GetUserGeneralSettings(accessToken.ItemId,
+ accessToken.AccountId);
+
+ var response = _smsAuthService.SendRequestMessage(user.MobilePhone);
+ WspContext.Services.Organizations.SetAccessTokenResponse(accessToken.AccessTokenGuid, response);
+
+ return RedirectToRoute(AccountRouteNames.PasswordResetSms);
+ }
+
#region Helpers
private UserProfile GetUserProfileModel(int itemId, int accountId)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/CustomAttributes/OrganizationPasswordPolicyAttribute.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/CustomAttributes/OrganizationPasswordPolicyAttribute.cs
index 14cfd4c1..1bd6c7c6 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/CustomAttributes/OrganizationPasswordPolicyAttribute.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/CustomAttributes/OrganizationPasswordPolicyAttribute.cs
@@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
+using System.Web;
using System.Web.Mvc;
using WebsitePanel.Providers.HostedSolution;
using WebsitePanel.WebDav.Core;
+using WebsitePanel.WebDav.Core.Config;
namespace WebsitePanel.WebDavPortal.CustomAttributes
{
@@ -15,14 +17,25 @@ namespace WebsitePanel.WebDavPortal.CustomAttributes
public OrganizationPasswordPolicyAttribute()
{
- Settings = WspContext.Services.Organizations.GetOrganizationPasswordSettings(WspContext.User.ItemId);
+ int itemId = -1;
+
+ if (WspContext.User != null)
+ {
+ itemId = WspContext.User.ItemId;
+ }
+ else if (HttpContext.Current != null && HttpContext.Current.Session[WebDavAppConfigManager.Instance.SessionKeys.ItemId] != null)
+ {
+ itemId = (int) HttpContext.Current.Session[WebDavAppConfigManager.Instance.SessionKeys.ItemId];
+ }
+
+
+ Settings = WspContext.Services.Organizations.GetOrganizationPasswordSettings(itemId);
}
protected override ValidationResult IsValid(object value, ValidationContext validationContext)
{
- if (value != null && WspContext.User != null)
+ if (value != null)
{
-
var resultMessages = new List();
if (Settings != null)
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs
index c7661530..ad15cd2b 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/DependencyInjection/PortalDependencies.cs
@@ -4,6 +4,7 @@ using WebsitePanel.WebDav.Core.Interfaces.Managers;
using WebsitePanel.WebDav.Core.Interfaces.Managers.Users;
using WebsitePanel.WebDav.Core.Interfaces.Owa;
using WebsitePanel.WebDav.Core.Interfaces.Security;
+using WebsitePanel.WebDav.Core.Interfaces.Services;
using WebsitePanel.WebDav.Core.Interfaces.Storages;
using WebsitePanel.WebDav.Core.Managers;
using WebsitePanel.WebDav.Core.Managers.Users;
@@ -11,6 +12,7 @@ using WebsitePanel.WebDav.Core.Owa;
using WebsitePanel.WebDav.Core.Security.Authentication;
using WebsitePanel.WebDav.Core.Security.Authorization;
using WebsitePanel.WebDav.Core.Security.Cryptography;
+using WebsitePanel.WebDav.Core.Services;
using WebsitePanel.WebDav.Core.Storages;
using WebsitePanel.WebDavPortal.DependencyInjection.Providers;
@@ -31,6 +33,8 @@ namespace WebsitePanel.WebDavPortal.DependencyInjection
kernel.Bind().To();
kernel.Bind().To();
kernel.Bind().To();
+ kernel.Bind().To();
+ kernel.Bind().To();
}
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetEmailModel.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetEmailModel.cs
new file mode 100644
index 00000000..2655e419
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetEmailModel.cs
@@ -0,0 +1,14 @@
+using System.ComponentModel.DataAnnotations;
+using WebsitePanel.WebDavPortal.Models.Common;
+using WebsitePanel.WebDavPortal.Resources;
+
+namespace WebsitePanel.WebDavPortal.Models.Account
+{
+ public class PasswordResetEmailModel : BaseModel
+ {
+ [Required]
+ [Display(ResourceType = typeof(Resources.UI), Name = "Email")]
+ [EmailAddress(ErrorMessageResourceType = typeof(Messages), ErrorMessageResourceName = "EmailInvalid",ErrorMessage = null)]
+ public string Email { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetSmsModel.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetSmsModel.cs
new file mode 100644
index 00000000..0a0e2715
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Account/PasswordResetSmsModel.cs
@@ -0,0 +1,12 @@
+using System.ComponentModel.DataAnnotations;
+using WebsitePanel.WebDavPortal.Models.Common;
+
+namespace WebsitePanel.WebDavPortal.Models.Account
+{
+ public class PasswordResetSmsModel : BaseModel
+ {
+ [Required]
+ public string Sms { get; set; }
+ public bool IsTokenExist { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/EditorTemplates/PasswordEditor.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/EditorTemplates/PasswordEditor.cs
index 03b30a43..9ef55cc6 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/EditorTemplates/PasswordEditor.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/Common/EditorTemplates/PasswordEditor.cs
@@ -4,7 +4,7 @@ using WebsitePanel.WebDavPortal.CustomAttributes;
namespace WebsitePanel.WebDavPortal.Models.Common.EditorTemplates
{
- public class PasswordEditor
+ public class PasswordEditor : BaseModel
{
[Display(ResourceType = typeof(Resources.UI), Name = "NewPassword")]
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.Designer.cs
index af62e425..04c01d13 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.Designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.Designer.cs
@@ -60,6 +60,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Account was not found.
+ ///
+ public static string AccountNotFound {
+ get {
+ return ResourceManager.GetString("AccountNotFound", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Email is invalid.
///
@@ -69,6 +78,24 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Your password could not be reset. The url you followed is either incorrect, has been used or has expired..
+ ///
+ public static string IncorrectPasswordResetUrl {
+ get {
+ return ResourceManager.GetString("IncorrectPasswordResetUrl", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Incorrect text message (SMS) response..
+ ///
+ public static string IncorrectSmsResponse {
+ get {
+ return ResourceManager.GetString("IncorrectSmsResponse", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Old password is not correct.
///
@@ -114,6 +141,33 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to A message was sent to your email address. Please check your email for further instructions..
+ ///
+ public static string PasswordResetEmailSent {
+ get {
+ return ResourceManager.GetString("PasswordResetEmailSent", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Text message (SMS) was sent to the phone number associated to your account. If you didn't recieve text message (SMS) click {0} for new text message (SMS)..
+ ///
+ public static string PasswordResetSmsHintFormat {
+ get {
+ return ResourceManager.GetString("PasswordResetSmsHintFormat", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Webdav portal user request..
+ ///
+ public static string PasswordResetUserReason {
+ get {
+ return ResourceManager.GetString("PasswordResetUserReason", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Password should contain at least {0} non-alphanumeric symbols.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.resx b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.resx
index 88beb538..2ebec533 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/Messages.resx
@@ -117,9 +117,18 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Account was not found
+
Email is invalid
+
+ Your password could not be reset. The url you followed is either incorrect, has been used or has expired.
+
+
+ Incorrect text message (SMS) response.
+
Old password is not correct
@@ -135,6 +144,15 @@
Password should contain at least {0} numbers
+
+ A message was sent to your email address. Please check your email for further instructions.
+
+
+ Text message (SMS) was sent to the phone number associated to your account. If you didn't recieve text message (SMS) click {0} for new text message (SMS).
+
+
+ Webdav portal user request.
+
Password should contain at least {0} non-alphanumeric symbols
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
index a88478a0..d189d450 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.Designer.cs
@@ -357,6 +357,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Forgot your password?.
+ ///
+ public static string ForgotYourPassword {
+ get {
+ return ResourceManager.GetString("ForgotYourPassword", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to General Information.
///
@@ -528,6 +537,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Next.
+ ///
+ public static string Next {
+ get {
+ return ResourceManager.GetString("Next", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to No files are selected..
///
@@ -600,6 +618,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Password reset.
+ ///
+ public static string PasswordReset {
+ get {
+ return ResourceManager.GetString("PasswordReset", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to PB.
///
@@ -717,6 +744,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Send email.
+ ///
+ public static string SendEmail {
+ get {
+ return ResourceManager.GetString("SendEmail", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Size.
///
@@ -726,6 +762,15 @@ namespace WebsitePanel.WebDavPortal.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Sms.
+ ///
+ public static string Sms {
+ get {
+ return ResourceManager.GetString("Sms", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to State/Province.
///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
index deda00a1..2b5cbd35 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Resources/UI.resx
@@ -216,6 +216,9 @@
First Name
+
+ Forgot your password?
+
General Information
@@ -273,6 +276,9 @@
Confirm password
+
+ Next
+
No files are selected.
@@ -297,6 +303,9 @@
Will expire on {0}. If you want to change password then please click {1}.
+
+ Password reset
+
PB
@@ -336,9 +345,15 @@
Select files to upload
+
+ Send email
+
Size
+
+ Sms
+
State/Province
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/_references.js b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/_references.js
index 7a771e40..2a5be867 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/_references.js
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Scripts/_references.js
@@ -1,8 +1,9 @@
-///
-///
+///
///
///
+///
///
+///
///
///
///
@@ -10,5 +11,36 @@
///
///
///
+///
+///
+///
///
///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
+///
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
index c7c827b8..b5d506d8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
@@ -1,4 +1,6 @@
-@model WebsitePanel.WebDavPortal.Models.AccountModel
+@using WebsitePanel.WebDavPortal.Resources
+@using WebsitePanel.WebDavPortal.UI.Routes
+@model WebsitePanel.WebDavPortal.Models.AccountModel
@{
ViewBag.Title = "Login";
}
@@ -30,6 +32,7 @@
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmail.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmail.cshtml
new file mode 100644
index 00000000..96052e57
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmail.cshtml
@@ -0,0 +1,31 @@
+@using WebsitePanel.WebDavPortal.Resources
+@using WebsitePanel.WebDavPortal.UI.Routes
+@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetEmailModel
+
+@{
+ Layout = "~/Views/Shared/_Layout.cshtml";
+}
+
+
+
+ @using (Html.BeginRouteForm(AccountRouteNames.PasswordResetEmail, FormMethod.Post, new { @class = "form-horizontal user-password-reset-email bs-val-styles col-lg-10 col-lg-offset-3", id = "user-password-reset" }))
+ {
+
+
@UI.PasswordReset
+
+
+
+
+ }
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmailSent.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmailSent.cshtml
new file mode 100644
index 00000000..7455f688
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetEmailSent.cshtml
@@ -0,0 +1,14 @@
+@using WebsitePanel.WebDavPortal.Resources
+
+@{
+ Layout = "~/Views/Shared/_Layout.cshtml";
+}
+
+
+
+
+
@UI.PasswordReset
+ @Messages.PasswordResetEmailSent
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetFinalStep.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetFinalStep.cshtml
new file mode 100644
index 00000000..11fbfbfc
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetFinalStep.cshtml
@@ -0,0 +1,27 @@
+@{
+ Layout = "~/Views/Shared/_Layout.cshtml";
+}
+@using WebsitePanel.WebDavPortal.Resources
+@using WebsitePanel.WebDavPortal.UI.Routes
+@model WebsitePanel.WebDavPortal.Models.Common.EditorTemplates.PasswordEditor
+
+
+ @using (Html.BeginRouteForm(AccountRouteNames.PasswordResetFinalStep, FormMethod.Post, new { @class = "form-horizontal user-password-reset-final-step bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset" }))
+ {
+
+
+
@UI.PasswordReset
+
+
+ @Html.EditorFor(x=>x)
+
+
+ }
+
+
+
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetSms.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetSms.cshtml
new file mode 100644
index 00000000..08523c08
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/PasswordResetSms.cshtml
@@ -0,0 +1,38 @@
+@using WebsitePanel.WebDavPortal.Resources
+@using WebsitePanel.WebDavPortal.UI.Routes
+@model WebsitePanel.WebDavPortal.Models.Account.PasswordResetSmsModel
+
+@{
+ Layout = "~/Views/Shared/_Layout.cshtml";
+}
+
+@if (Model.IsTokenExist)
+{
+
+ @using (Html.BeginRouteForm(AccountRouteNames.PasswordResetSms, FormMethod.Post, new {@class = "form-horizontal user-password-reset-sms bs-val-styles col-lg-9 col-lg-offset-3", id = "user-password-reset"}))
+ {
+ @Html.HiddenFor(x=>x.IsTokenExist)
+
+
+
@UI.PasswordReset
+
+
+ @Html.Raw(string.Format(Messages.PasswordResetSmsHintFormat, Html.RouteLink(UI.Here.ToLowerInvariant(), AccountRouteNames.PasswordResetSendSms)))
+
+
+
+
+ }
+
+}
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
index 25cc02b3..725be072 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
@@ -43,7 +43,8 @@
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
index b33b3e60..d186e35d 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Web.config
@@ -52,7 +52,8 @@
-
+
+
@@ -86,12 +87,12 @@
-
-
-
-
-
-
+
+
+
+
+
+
@@ -100,6 +101,7 @@
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Hello #Account.DisplayName#,
+
+
+ Thanks for choosing VirtuWorks as your Exchange hosting provider.
+
+
+
+ User Accounts
+
+ The following user accounts have been created for you.
+
+
+
+ Username: |
+ #Account.UserPrincipalName# |
+
+
+ E-mail: |
+ #Account.PrimaryEmailAddress# |
+
+
+ Password Reset Url: |
+ Click here |
+
+
+
+ DNS
+
+ In order for us to accept mail for your domain, you will need to point your MX records to:
+
+
+
+ Webmail (OWA, Outlook Web Access)
+
+ https://mail.virtuworks.net/owa
+
+
+ Outlook (Windows Clients)
+
+ To configure Outlook 2013 to work with the VirtuWorks servers, please reference:
+
+
+ http://www.virtuworks.com/how-to-configure-my-outlook-2010-client-to-work-with-my-velum-hosted-exchange-account/
+
+
+ If you need to download and install the Outlook client:
+
+
+
+
+
+ ActiveSync, iPhone, iPad
+
+
+ Server: |
+ #ActiveSyncServer# |
+
+
+ Domain: |
+ #SamDomain# |
+
+
+ SSL: |
+ must be checked |
+
+
+ Your username: |
+ #SamUsername# |
+
+
+
+ Password Changes
+
+ Passwords can be changed at any time using Webmail or the Control Panel.
+ Control Panel
+
+ If you need to change the details of your account, you can easily do this using Control Panel.
+ Support
+
+ You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/support
+
+
+
+
|
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+';
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'HtmlBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'HtmlBody', @ExchangeMailboxSetupLetterHtmlBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @ExchangeMailboxSetupLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'HtmlBody'
+GO
+
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'Priority' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'Priority', N'Normal')
+END
+GO
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'Subject' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'Subject', N'Virtuworks Hosted Exchange Mailbox Setup')
+END
+GO
+
+
+DECLARE @ExchangeMailboxSetupLetterTextBody nvarchar(2500)
+
+Set @ExchangeMailboxSetupLetterTextBody = N'
+Hello #Account.DisplayName#,
+
+Thanks for choosing VirtuWorks as your Exchange hosting provider.
+
+
+User Accounts
+
+The following user accounts have been created for you.
+
+Username: #Account.UserPrincipalName#
+E-mail: #Account.PrimaryEmailAddress#
+Password Reset Url: #PswResetUrl#
+
+
+=================================
+DNS
+=================================
+
+In order for us to accept mail for your domain, you will need to point your MX records to:
+
+#SmtpServer#
+
+=================================
+Webmail (OWA, Outlook Web Access)
+=================================
+
+https://mail.virtuworks.net/owa
+
+=================================
+Outlook (Windows Clients)
+=================================
+
+To configure Outlook 2010 to work with VirtuWorks servers, please reference:
+
+https://portal.virtuworks.net/whmcs/knowledgebase.php?action=displayarticle&id=2
+
+If you need to download and install the Outlook 2010 client:
+
+Outlook 2010 Download URL:
+32 Bit - http://www.virtuworks.net/downloads/Outlook2010-32bit.zip
+64 Bit - http://www.virtuworks.net/downloads/Outlook2010-64bit.zip
+KEY: HXGFV-DY3HM-4W2BQ-3R7KQ-K8P49
+
+=================================
+ActiveSync, iPhone, iPad
+=================================
+
+Server: #ActiveSyncServer#
+Domain: #SamDomain#
+SSL: must be checked
+Your username: #SamUsername#
+
+=================================
+Password Changes
+=================================
+
+Passwords can be changed at any time using Webmail or the Control Panel (https://controlpanel.virtuworks.net).
+
+
+=================================
+Control Panel
+=================================
+
+If you need to change the details of your account, you can easily do this using the Control Panel (https://controlpanel.virtuworks.net).
+
+
+=================================
+Support
+=================================
+
+You have 2 options, email help@virtuworks.com or use the web interface at http://www.virtuworks.com/contact/'
+
+IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody' )
+BEGIN
+INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'ExchangeMailboxSetupLetter', N'TextBody', @ExchangeMailboxSetupLetterTextBody)
+END
+ELSE
+UPDATE [dbo].[UserSettings] SET [PropertyValue] = @ExchangeMailboxSetupLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'ExchangeMailboxSetupLetter' AND [PropertyName]= N'TextBody'
+GO
+
-- ORGANIZATION USER PASSWORD RESET TOKENS
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index 43e9ec0d..404ce57d 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1646,7 +1646,7 @@ namespace WebsitePanel.EnterpriseServer
TaskManager.Write("MailTo : " + mailTo);
// send mail message
- //MailHelper.SendMessage(from, mailTo, string.Empty, subject, body, priority, isHtml);
+ MailHelper.SendMessage(from, mailTo, null, subject, body, priority, isHtml);
}
catch (Exception ex)
{
From 12d026e8b0ab8b9469b87cc3d0a980077e5c6069 Mon Sep 17 00:00:00 2001
From: Alexander Trofimov
Date: Fri, 17 Apr 2015 22:40:39 +0300
Subject: [PATCH 16/38] wsp-10329 Adding hyper-v replica to HyperV Provider.
WebPortal Part.
---
.../VirtualizationErrorCodes.cs | 2 +
.../VirtualizationServerController2012.cs | 44 +++
.../App_Data/WebsitePanel_Modules.config | 1 +
.../HyperV2012R2_Settings.ascx.cs | 7 +-
.../VpsDetailsReplications.ascx.resx | 174 ++++++++++++
.../VPS2012/VpsDetailsReplications.ascx | 146 ++++++++++
.../VPS2012/VpsDetailsReplications.ascx.cs | 262 +++++++++++++++++
.../VpsDetailsReplications.ascx.designer.cs | 267 ++++++++++++++++++
.../WebsitePanel.Portal.Modules.csproj | 11 +
9 files changed, 910 insertions(+), 4 deletions(-)
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/App_LocalResources/VpsDetailsReplications.ascx.resx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.cs
create mode 100644 WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.designer.cs
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs
index 7c92ee9f..4e51f34e 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/Virtualization/VirtualizationErrorCodes.cs
@@ -115,6 +115,8 @@
// Replication
public const string SET_REPLICA_SERVER_ERROR = "SET_REPLICA_SERVER_ERROR";
+ public const string SET_NO_REPLICA_SERVER_ERROR = "SET_NO_REPLICA_SERVER_ERROR";
+ public const string SET_SET_REPLICATION_ERROR = "SET_SET_REPLICATION_ERROR";
public const string HOST_NAMER_IS_ALREADY_USED = "HOST_NAMER_IS_ALREADY_USED";
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization2012/VirtualizationServerController2012.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization2012/VirtualizationServerController2012.cs
index 79a19aeb..f84f9849 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization2012/VirtualizationServerController2012.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Virtualization2012/VirtualizationServerController2012.cs
@@ -3751,6 +3751,50 @@ namespace WebsitePanel.EnterpriseServer
return vs.IsReplicaServer(remoteServer);
}
+ public static VmReplication GetReplication(int itemId)
+ {
+ VirtualMachine vm = GetVirtualMachineByItemId(itemId);
+ VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
+ return vs.GetReplication(vm.VirtualMachineId);
+ }
+
+ public static ResultObject SetVmReplication(int itemId, string replicaServer, VmReplication replication)
+ {
+ ResultObject result = new ResultObject();
+ try
+ {
+ VirtualMachine vm = GetVirtualMachineByItemId(itemId);
+ VirtualizationServer2012 vs = GetVirtualizationProxy(vm.ServiceId);
+
+ // Get replica server name
+ StringDictionary vsSesstings = ServerController.GetServiceSettings(vm.ServiceId);
+ string replicaServiceId = vsSesstings["ReplicaServerId"];
+
+ if (string.IsNullOrEmpty(replicaServiceId))
+ {
+ result.ErrorCodes.Add(VirtualizationErrorCodes.SET_NO_REPLICA_SERVER_ERROR);
+ return result;
+ }
+
+ //StringDictionary vsSesstings = ServerController.GetServiceSettings(vm.replicaServiceId);
+ //string replicaServiceId = vsSesstings["ReplicaServerId"];
+
+ //if (string.IsNullOrEmpty(replicaServiceId))
+ //{
+ // result.ErrorCodes.Add(VirtualizationErrorCodes.SET_NO_REPLICA_SERVER_ERROR);
+ // return result;
+ //}
+
+ vs.SetVmReplication(vm.VirtualMachineId, replicaServer, replication);
+ result.IsSuccess = true;
+ }
+ catch (Exception ex)
+ {
+ result.AddError(VirtualizationErrorCodes.SET_SET_REPLICATION_ERROR, ex);
+ }
+ return result;
+ }
+
#endregion
}
}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
index 827da994..e9b74d59 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/App_Data/WebsitePanel_Modules.config
@@ -658,6 +658,7 @@
+
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HyperV2012R2_Settings.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HyperV2012R2_Settings.ascx.cs
index 974ce822..2734e9eb 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HyperV2012R2_Settings.ascx.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/ProviderControls/HyperV2012R2_Settings.ascx.cs
@@ -237,7 +237,7 @@ namespace WebsitePanel.Portal.ProviderControls
continue;
var currentServiceSettings = ConvertArrayToDictionary(ES.Services.Servers.GetServiceSettings(serviceId));
- if (currentServiceSettings["ReplicaMode"] == ReplicaMode.IsReplicaServer.ToString())
+ if (currentServiceSettings["ReplicaMode"] != ReplicaMode.IsReplicaServer.ToString())
continue;
var exists = false;
@@ -294,11 +294,10 @@ namespace WebsitePanel.Portal.ProviderControls
ManagePreferredNameServerRow.Visible = ManageNicConfigRow.Visible && (ddlManageNicConfig.SelectedIndex == 0);
// Replica
- IsReplicaServerRow.Visible = IsReplicaServer;
EnableReplicaRow.Visible = EnabledReplica;
- ddlCertThumbnail.Visible = !IsRemoteServer;
- txtCertThumbnail.Visible = CertificateThumbnailValidator.Visible = IsRemoteServer;
IsReplicaServerRow.Visible = IsReplicaServer;
+ ddlCertThumbnail.Visible = CertificateDdlThumbnailValidator.Visible = !IsRemoteServer;
+ txtCertThumbnail.Visible = CertificateThumbnailValidator.Visible = IsRemoteServer;
ReplicaPathErrorTr.Visible = ReplicaErrorTr.Visible = false;
if (IsReplicaServer) BindCertificates();
if (EnabledReplica) BindReplicaServices();
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/App_LocalResources/VpsDetailsReplications.ascx.resx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/App_LocalResources/VpsDetailsReplications.ascx.resx
new file mode 100644
index 00000000..3b106beb
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/App_LocalResources/VpsDetailsReplications.ascx.resx
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ if(this.disabled) return false;if(!confirm('Do you want to apply selected snapshot to VPS?')) return false;ShowProgressDialog('Applying snapshot...');
+
+
+ if(this.disabled) return false;if(!confirm('Do you want to completely delete selected snapshot?')) return false;ShowProgressDialog('Deleting snapshot...');
+
+
+ if(!confirm('Do you want to completely delete selected snapshot and all its sub-tree?')) return false;ShowProgressDialog('Deleting snapshot sub-tree...');
+
+
+ ShowProgressDialog('Renaming snapshot...', 'RenameSnapshotModal');
+
+
+ ShowProgressDialog('Taking snapshot...');
+
+
+ Now
+
+
+ This virtual server has no snapshots.
+
+
+ Apply
+
+
+ Cancel
+
+
+ Delete
+
+
+ Delete Subtree
+
+
+ Rename
+
+
+ Rename
+
+
+ <p>To take a <b>snapshot</b> is much like to take a picture of current VPS state: its configuration, memory and hard disk.</p><p>Snapshots maybe used as backup/restore points when installing new software or using VPS for development or testing purposes. If something has gone wrong there is an ability to roll-back and <b>"Apply"</b> a snapshot with good configuration.</p><p><b>"Rename"</b> button allows renaming snapshot and giving it some informative name, for example "Before applying service pack".</p>
+
+
+ Created:
+
+
+ Number of Snapshots:
+
+
+ Rename Snapshot
+
+
+ Snapshots
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx
new file mode 100644
index 00000000..b66cb332
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx
@@ -0,0 +1,146 @@
+<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VpsDetailsReplications.ascx.cs" Inherits="WebsitePanel.Portal.VPS2012.VpsDetailsReplications" %>
+<%@ Register Src="../UserControls/SimpleMessageBox.ascx" TagName="SimpleMessageBox" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/ServerTabs.ascx" TagName="ServerTabs" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
+<%@ Register Src="UserControls/FormTitle.ascx" TagName="FormTitle" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
+<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.cs
new file mode 100644
index 00000000..d231dc9a
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.cs
@@ -0,0 +1,262 @@
+// Copyright (c) 2015, Outercurve Foundation.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// - Redistributions of source code must retain the above copyright notice, this
+// list of conditions and the following disclaimer.
+//
+// - Redistributions in binary form must reproduce the above copyright notice,
+// this list of conditions and the following disclaimer in the documentation
+// and/or other materials provided with the distribution.
+//
+// - Neither the name of the Outercurve Foundation nor the names of its
+// contributors may be used to endorse or promote products derived from this
+// software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+using System;
+using System.Collections.Generic;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using WebsitePanel.Providers.Common;
+using WebsitePanel.Providers.Virtualization;
+
+namespace WebsitePanel.Portal.VPS2012
+{
+ public partial class VpsDetailsReplications : WebsitePanelModuleBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ BindSnapshotsTree();
+ }
+ }
+
+ private void BindSnapshotsTree()
+ {
+ VirtualMachineSnapshot[] snapshots = ES.Services.VPS2012.GetVirtualMachineSnapshots(PanelRequest.ItemID);
+
+ // clear tree
+ SnapshotsTree.Nodes.Clear();
+
+ // fill tree by root nodes
+ AddChildNodes(SnapshotsTree.Nodes, null, snapshots);
+
+ // select first node
+ if (SnapshotsTree.Nodes.Count > 0)
+ {
+ SnapshotsTree.Nodes[0].Selected = true;
+ }
+
+ // refresh
+ BindSelectedNode();
+
+ // quotas
+ VirtualMachine vm = ES.Services.VPS2012.GetVirtualMachineItem(PanelRequest.ItemID);
+ snapshotsQuota.QuotaUsedValue = snapshots.Length;
+ snapshotsQuota.QuotaValue = vm.SnapshotsNumber;
+ btnTakeSnapshot.Enabled = snapshots.Length < vm.SnapshotsNumber;
+ }
+
+ private void BindSelectedNode()
+ {
+ TreeNode node = SnapshotsTree.SelectedNode;
+
+ btnApply.Enabled =
+ btnRename.Enabled =
+ btnDelete.Enabled =
+ btnDeleteSubtree.Enabled =
+ SnapshotDetailsPanel.Visible = (node != null);
+
+ NoSnapshotsPanel.Visible = (SnapshotsTree.Nodes.Count == 0);
+
+ if (node != null)
+ {
+ // set name
+ txtSnapshotName.Text = node.Text;
+
+ // load snapshot details
+ VirtualMachineSnapshot snapshot = ES.Services.VPS2012.GetSnapshot(PanelRequest.ItemID, node.Value);
+ if (snapshot != null)
+ litCreated.Text = snapshot.Created.ToString();
+
+ // set image
+ imgThumbnail.ImageUrl =
+ string.Format("~/DesktopModules/WebsitePanel/VPS2012/VirtualMachineSnapshotImage.ashx?ItemID={0}&SnapshotID={1}&rnd={2}",
+ PanelRequest.ItemID, HttpUtility.UrlEncode(node.Value), DateTime.Now.Ticks);
+ }
+ }
+
+ private void AddChildNodes(TreeNodeCollection parent, string parentId, VirtualMachineSnapshot[] snapshots)
+ {
+ foreach (VirtualMachineSnapshot snapshot in snapshots)
+ {
+ if (snapshot.ParentId == parentId)
+ {
+ // add node
+ TreeNode node = new TreeNode(snapshot.Name, snapshot.Id);
+ node.Expanded = true;
+ node.ImageUrl = PortalUtils.GetThemedImage("VPS/snapshot.png");
+ parent.Add(node);
+
+ // check if the current
+ if (snapshot.IsCurrent)
+ {
+ TreeNode nowNode = new TreeNode(GetLocalizedString("Now.Text"), "");
+ nowNode.ImageUrl = PortalUtils.GetThemedImage("VPS/start2.png");
+ nowNode.SelectAction = TreeNodeSelectAction.None;
+ node.ChildNodes.Add(nowNode);
+ }
+
+ // fill children
+ AddChildNodes(node.ChildNodes, snapshot.Id, snapshots);
+ }
+ }
+ }
+
+ protected void btnTakeSnapshot_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ ResultObject res = ES.Services.VPS2012.CreateSnapshot(PanelRequest.ItemID);
+
+ if (res.IsSuccess)
+ {
+ // bind tree
+ BindSnapshotsTree();
+ return;
+ }
+ else
+ {
+ // show error
+ messageBox.ShowMessage(res, "VPS_ERROR_TAKE_SNAPSHOT", "VPS");
+ }
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("VPS_ERROR_TAKE_SNAPSHOT", ex);
+ }
+ }
+
+ protected void btnApply_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ ResultObject res = ES.Services.VPS2012.ApplySnapshot(PanelRequest.ItemID, GetSelectedSnapshot());
+
+ if (res.IsSuccess)
+ {
+ // bind tree
+ BindSnapshotsTree();
+ return;
+ }
+ else
+ {
+ // show error
+ messageBox.ShowMessage(res, "VPS_ERROR_APPLY_SNAPSHOT", "VPS");
+ }
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("VPS_ERROR_APPLY_SNAPSHOT", ex);
+ }
+ }
+
+ protected void btnRenameSnapshot_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ string newName = txtSnapshotName.Text.Trim();
+ ResultObject res = ES.Services.VPS2012.RenameSnapshot(PanelRequest.ItemID, GetSelectedSnapshot(), newName);
+
+ if (res.IsSuccess)
+ {
+ // bind tree
+ SnapshotsTree.SelectedNode.Text = newName;
+ return;
+ }
+ else
+ {
+ // show error
+ messageBox.ShowMessage(res, "VPS_ERROR_RENAME_SNAPSHOT", "VPS");
+ }
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("VPS_ERROR_RENAME_SNAPSHOT", ex);
+ }
+ }
+
+ protected void btnDelete_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ ResultObject res = ES.Services.VPS2012.DeleteSnapshot(PanelRequest.ItemID, GetSelectedSnapshot());
+
+ if (res.IsSuccess)
+ {
+ // bind tree
+ BindSnapshotsTree();
+ return;
+ }
+ else
+ {
+ // show error
+ messageBox.ShowMessage(res, "VPS_ERROR_DELETE_SNAPSHOT", "VPS");
+ }
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("VPS_ERROR_DELETE_SNAPSHOT", ex);
+ }
+ }
+
+ protected void btnDeleteSubtree_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ ResultObject res = ES.Services.VPS2012.DeleteSnapshotSubtree(PanelRequest.ItemID, GetSelectedSnapshot());
+
+ if (res.IsSuccess)
+ {
+ // bind tree
+ BindSnapshotsTree();
+ return;
+ }
+ else
+ {
+ // show error
+ messageBox.ShowMessage(res, "VPS_ERROR_DELETE_SNAPSHOT_SUBTREE", "VPS");
+ }
+ }
+ catch (Exception ex)
+ {
+ messageBox.ShowErrorMessage("VPS_ERROR_DELETE_SNAPSHOT_SUBTREE", ex);
+ }
+ }
+
+ private string GetSelectedSnapshot()
+ {
+ return SnapshotsTree.SelectedNode.Value;
+ }
+
+ protected void SnapshotsTree_SelectedNodeChanged(object sender, EventArgs e)
+ {
+ BindSelectedNode();
+ }
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.designer.cs b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.designer.cs
new file mode 100644
index 00000000..dcfa30fe
--- /dev/null
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/VPS2012/VpsDetailsReplications.ascx.designer.cs
@@ -0,0 +1,267 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace WebsitePanel.Portal.VPS2012 {
+
+
+ public partial class VpsDetailsReplications {
+
+ ///
+ /// asyncTasks control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.EnableAsyncTasksSupport asyncTasks;
+
+ ///
+ /// breadcrumb control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.VPS2012.UserControls.Breadcrumb breadcrumb;
+
+ ///
+ /// menu control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.VPS2012.UserControls.Menu menu;
+
+ ///
+ /// imgIcon control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgIcon;
+
+ ///
+ /// locTitle control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.VPS2012.UserControls.FormTitle locTitle;
+
+ ///
+ /// tabs control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.VPS2012.UserControls.ServerTabs tabs;
+
+ ///
+ /// messageBox control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.UserControls.SimpleMessageBox messageBox;
+
+ ///
+ /// btnTakeSnapshot control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnTakeSnapshot;
+
+ ///
+ /// SnapshotsTree control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TreeView SnapshotsTree;
+
+ ///
+ /// NoSnapshotsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlGenericControl NoSnapshotsPanel;
+
+ ///
+ /// locNoSnapshots control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locNoSnapshots;
+
+ ///
+ /// locQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locQuota;
+
+ ///
+ /// snapshotsQuota control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::WebsitePanel.Portal.QuotaViewer snapshotsQuota;
+
+ ///
+ /// SnapshotDetailsPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlTableCell SnapshotDetailsPanel;
+
+ ///
+ /// imgThumbnail control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Image imgThumbnail;
+
+ ///
+ /// locCreated control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locCreated;
+
+ ///
+ /// litCreated control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Literal litCreated;
+
+ ///
+ /// btnApply control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnApply;
+
+ ///
+ /// btnRename control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnRename;
+
+ ///
+ /// btnDelete control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnDelete;
+
+ ///
+ /// btnDeleteSubtree control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.LinkButton btnDeleteSubtree;
+
+ ///
+ /// RenamePanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Panel RenamePanel;
+
+ ///
+ /// locRenameSnapshot control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Localize locRenameSnapshot;
+
+ ///
+ /// txtSnapshotName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.TextBox txtSnapshotName;
+
+ ///
+ /// SnapshotNameValidator control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.RequiredFieldValidator SnapshotNameValidator;
+
+ ///
+ /// btnRenameSnapshot control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnRenameSnapshot;
+
+ ///
+ /// btnCancelRename control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Button btnCancelRename;
+
+ ///
+ /// RenameSnapshotModal control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::AjaxControlToolkit.ModalPopupExtender RenameSnapshotModal;
+ }
+}
diff --git a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
index f9c0c3ad..9c1cd5a4 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
+++ b/WebsitePanel/Sources/WebsitePanel.WebPortal/DesktopModules/WebsitePanel/WebsitePanel.Portal.Modules.csproj
@@ -512,6 +512,13 @@
VpsDetailsPermissions.ascx
+
+ VpsDetailsReplications.ascx
+ ASPXCodeBehind
+
+
+ VpsDetailsReplications.ascx
+
VpsDetailsSnapshots.ascx
ASPXCodeBehind
@@ -4849,6 +4856,7 @@
+
@@ -5220,6 +5228,9 @@
Designer
+
+ Designer
+
From e8643e17ddcd0c43bacfc29ab2007fa3a0d0abec Mon Sep 17 00:00:00 2001
From: Virtuworks
Date: Fri, 17 Apr 2015 23:03:49 -0400
Subject: [PATCH 17/38] Added tag build-2.1.0.668 for changeset 41c22204b579
From 087697ba7f3a21d9617c70265a87f756e53a77e6 Mon Sep 17 00:00:00 2001
From: vfedosevich
Date: Mon, 20 Apr 2015 03:01:21 -0700
Subject: [PATCH 18/38] password reset fixes
---
WebsitePanel/Database/update_db.sql | 10 ++++--
.../System/SystemSettings.cs | 22 ++++++++++++-
.../ExchangeServerController.cs | 8 ++++-
.../HostedSolution/OrganizationController.cs | 31 ++++++++++++++++---
.../Controllers/AccountController.cs | 12 ++++++-
.../Models/AccountModel.cs | 2 ++
.../Views/Account/Login.cshtml | 6 +++-
.../Views/Shared/_Layout.cshtml | 13 +++++---
.../SystemSettings.ascx.resx | 6 ++++
.../UserOrganization.ascx.resx | 3 ++
.../ExchangeServer/OrganizationHome.ascx | 8 -----
.../ExchangeServer/OrganizationHome.ascx.cs | 3 --
.../OrganizationHome.ascx.designer.cs | 18 -----------
.../OrganizationUserGeneralSettings.ascx.cs | 8 +++++
.../WebsitePanel/SystemSettings.ascx | 6 ++++
.../WebsitePanel/SystemSettings.ascx.cs | 3 ++
.../SystemSettings.ascx.designer.cs | 18 +++++++++++
.../UserControls/OrganizationMenuControl.cs | 2 ++
18 files changed, 133 insertions(+), 46 deletions(-)
diff --git a/WebsitePanel/Database/update_db.sql b/WebsitePanel/Database/update_db.sql
index 0490afd7..9fa58a77 100644
--- a/WebsitePanel/Database/update_db.sql
+++ b/WebsitePanel/Database/update_db.sql
@@ -9850,7 +9850,7 @@ Hello #user.FirstName#,
Your password expiration date is #user.PasswordExpirationDateTime#. You can reset your own password by visiting the following page:
-#passwordResetLink#
+#passwordResetLink#
@@ -9963,7 +9963,7 @@ Hello #user.FirstName#,
We received a request to reset the password for your account. If you made this request, click the link below. If you did not make this request, you can ignore this email.
-#passwordResetLink#
+#passwordResetLink#
@@ -10139,10 +10139,12 @@ Set @ExchangeMailboxSetupLetterHtmlBody = N'E-mail:
#Account.PrimaryEmailAddress# |
+
Password Reset Url: |
- Click here |
+ Click here |
+
DNS
@@ -10308,8 +10310,10 @@ The following user accounts have been created for you.
Username: #Account.UserPrincipalName#
E-mail: #Account.PrimaryEmailAddress#
+
Password Reset Url: #PswResetUrl#
+
=================================
DNS
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs
index 89033a84..d3edc7ee 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Base/System/SystemSettings.cs
@@ -27,6 +27,7 @@
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using System;
+using System.Linq;
using System.Xml;
using System.Collections.Generic;
using System.Text;
@@ -46,6 +47,7 @@ namespace WebsitePanel.EnterpriseServer
public const string PACKAGE_DISPLAY_SETTINGS = "PackageDisplaySettings";
public const string RDS_SETTINGS = "RdsSettings";
public const string WEBDAV_PORTAL_SETTINGS = "WebdavPortalSettings";
+ public const string WEBDAV_PASSWORD_RESET_ENABLED_KEY = "WebdavPasswordResetEnabled";
// key to access to wpi main & custom feed in wpi settings
public const string WPI_MAIN_FEED_KEY = "WpiMainFeedUrl";
@@ -98,7 +100,25 @@ namespace WebsitePanel.EnterpriseServer
}
}
- public int GetInt(string settingName)
+ public bool Contains(string settingName)
+ {
+ return Settings.AllKeys.Any(x => x.ToLowerInvariant() == (settingName ?? string.Empty).ToLowerInvariant());
+ }
+
+ public T GetValueOrDefault(string settingName, T defaultValue)
+ {
+ try
+ {
+ return (T)Convert.ChangeType(Settings[settingName], typeof(T));
+ }
+ catch
+ {
+ }
+
+ return defaultValue;
+ }
+
+ public int GetInt(string settingName)
{
return Int32.Parse(Settings[settingName]);
}
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
index b6458e47..47a17473 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/ExchangeServer/ExchangeServerController.cs
@@ -2613,10 +2613,16 @@ namespace WebsitePanel.EnterpriseServer
// add account
items["Account"] = account;
- items["PswResetUrl"] = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId);
items["AccountDomain"] = account.PrimaryEmailAddress.Substring(account.PrimaryEmailAddress.IndexOf("@") + 1);
items["DefaultDomain"] = org.DefaultDomain;
+ var passwordResetUrl = OrganizationController.GenerateUserPasswordResetLink(account.ItemId, account.AccountId);
+ if (!string.IsNullOrEmpty(passwordResetUrl))
+ {
+ items["PswResetUrl"] = passwordResetUrl;
+ }
+
+
if (!String.IsNullOrEmpty(account.SamAccountName))
{
int idx = account.SamAccountName.IndexOf("\\");
diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
index 404ce57d..15ca5e96 100644
--- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/HostedSolution/OrganizationController.cs
@@ -1684,6 +1684,11 @@ namespace WebsitePanel.EnterpriseServer
throw new Exception("Webdav portal system settings are not set");
}
+ if (!settings.GetValueOrDefault(SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false) ||!settings.Contains("WebdavPortalUrl"))
+ {
+ return string.Empty;
+ }
+
var webdavPortalUrl = new Uri(settings["WebdavPortalUrl"]);
var token = CreateAccessToken(itemId, accountId, AccessTokenTypes.PasswrodReset);
@@ -1794,11 +1799,12 @@ namespace WebsitePanel.EnterpriseServer
NumbersCount = Utils.ParseInt(parts[4], 0),
SymbolsCount = Utils.ParseInt(parts[5], 0),
AccountLockoutThreshold = Utils.ParseInt(parts[7], 0),
- EnforcePasswordHistory = Utils.ParseInt(parts[8], 0),
- AccountLockoutDuration = Utils.ParseInt(parts[9], 0),
- ResetAccountLockoutCounterAfter = Utils.ParseInt(parts[10], 0),
- LockoutSettingsEnabled = Utils.ParseBool(parts[11], false),
- PasswordComplexityEnabled = Utils.ParseBool(parts[12], true),
+
+ EnforcePasswordHistory = GetValueSafe(parts, 8, 0),
+ AccountLockoutDuration = GetValueSafe(parts, 9, 0),
+ ResetAccountLockoutCounterAfter = GetValueSafe(parts, 10, 0),
+ LockoutSettingsEnabled = GetValueSafe(parts, 11, false),
+ PasswordComplexityEnabled = GetValueSafe(parts, 11, true),
};
@@ -1821,6 +1827,21 @@ namespace WebsitePanel.EnterpriseServer
return passwordSettings;
}
+ public static T GetValueSafe(string[] array, int index, T defaultValue)
+ {
+ if (array.Length > index)
+ {
+ if (string.IsNullOrEmpty(array[index]))
+ {
+ return defaultValue;
+ }
+
+ return (T)Convert.ChangeType(array[index], typeof(T));
+ }
+
+ return defaultValue;
+ }
+
public static void UpdateOrganizationGeneralSettings(int itemId, OrganizationGeneralSettings settings)
{
TaskManager.StartTask("ORGANIZATION", "UPDATE_GENERAL_SETTINGS");
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
index f326b353..654fd5d8 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Controllers/AccountController.cs
@@ -44,7 +44,17 @@ namespace WebsitePanel.WebDavPortal.Controllers
return RedirectToRoute(FileSystemRouteNames.ShowContentPath, new { org = WspContext.User.OrganizationId });
}
- return View();
+ var model = new AccountModel();
+
+ var settings = WspContext.Services.System.GetSystemSettings(EnterpriseServer.SystemSettings.WEBDAV_PORTAL_SETTINGS);
+
+ if (settings != null)
+ {
+ model.PasswordResetEnabled = settings.GetValueOrDefault(EnterpriseServer.SystemSettings.WEBDAV_PASSWORD_RESET_ENABLED_KEY, false);
+
+ }
+
+ return View(model);
}
[HttpPost]
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/AccountModel.cs b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/AccountModel.cs
index 3093f79c..57351755 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/AccountModel.cs
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Models/AccountModel.cs
@@ -17,5 +17,7 @@ namespace WebsitePanel.WebDavPortal.Models
public string Password { get; set; }
public string LdapError { get; set; }
+
+ public bool PasswordResetEnabled { get; set; }
}
}
\ No newline at end of file
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
index 65d23735..23aaf2f0 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Account/Login.cshtml
@@ -9,6 +9,7 @@
diff --git a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
index 17e01610..0a08f09f 100644
--- a/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
+++ b/WebsitePanel/Sources/WebsitePanel.WebDavPortal/Views/Shared/_Layout.cshtml
@@ -28,11 +28,14 @@