Policies extended with plan templates for Exchange and Lync
Automated provisioning of plans added when template plans are defined Lync plan maintenance added Ability to disable editing of lync plans within hosting plans People picker adjusted for public folders, contact, and distribution liost
This commit is contained in:
parent
76f6ea43cf
commit
008fc296d5
30 changed files with 2357 additions and 118 deletions
|
@ -3192,6 +3192,18 @@ namespace WebsitePanel.EnterpriseServer
|
|||
"GetLyncUsers", sqlParams);
|
||||
}
|
||||
|
||||
|
||||
public static IDataReader GetLyncUsersByPlanId(int itemId, int planId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetLyncUsersByPlanId",
|
||||
new SqlParameter("@ItemID", itemId),
|
||||
new SqlParameter("@PlanId", planId)
|
||||
);
|
||||
}
|
||||
|
||||
public static int GetLyncUsersCount(int itemId)
|
||||
{
|
||||
SqlParameter[] sqlParams = new SqlParameter[]
|
||||
|
|
|
@ -450,6 +450,11 @@ namespace WebsitePanel.EnterpriseServer.Code.HostedSolution
|
|||
return res;
|
||||
}
|
||||
|
||||
public static List<LyncUser> GetLyncUsersByPlanId(int itemId, int planId)
|
||||
{
|
||||
return ObjectUtils.CreateListFromDataReader<LyncUser>(DataProvider.GetLyncUsersByPlanId(itemId, planId));
|
||||
}
|
||||
|
||||
public static IntResult GetLyncUsersCount(int itemId)
|
||||
{
|
||||
IntResult res = TaskManager.StartResultTask<IntResult>("LYNC", "GET_LYNC_USERS_COUNT");
|
||||
|
|
|
@ -40,6 +40,11 @@ using WebsitePanel.Providers.HostedSolution;
|
|||
using WebsitePanel.Providers.ResultObjects;
|
||||
using WebsitePanel.Providers.SharePoint;
|
||||
using WebsitePanel.Providers.Common;
|
||||
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace WebsitePanel.EnterpriseServer
|
||||
{
|
||||
public class OrganizationController
|
||||
|
@ -352,6 +357,62 @@ namespace WebsitePanel.EnterpriseServer
|
|||
|
||||
PackageController.AddPackageItem(orgDomain);
|
||||
|
||||
|
||||
if (cntx.Quotas[Quotas.EXCHANGE2007_MAILBOXES] != null)
|
||||
{
|
||||
// 5) Create default mailbox plans
|
||||
// load user info
|
||||
UserInfo user = PackageController.GetPackageOwner(org.PackageId);
|
||||
|
||||
// get settings
|
||||
UserSettings userSettings = UserController.GetUserSettings(user.UserId, "ExchangeMailboxPlansPolicy");
|
||||
|
||||
if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_MAILBOXPLANS]))
|
||||
{
|
||||
|
||||
List<ExchangeMailboxPlan> list = new List<ExchangeMailboxPlan>();
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(list.GetType());
|
||||
|
||||
StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_MAILBOXPLANS]);
|
||||
|
||||
list = (List<ExchangeMailboxPlan>)serializer.Deserialize(reader);
|
||||
|
||||
foreach (ExchangeMailboxPlan p in list)
|
||||
{
|
||||
ExchangeServerController.AddExchangeMailboxPlan(itemId, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cntx.Quotas[Quotas.LYNC_USERS] != null)
|
||||
{
|
||||
// 5) Create default mailbox plans
|
||||
// load user info
|
||||
UserInfo user = PackageController.GetPackageOwner(org.PackageId);
|
||||
|
||||
// get settings
|
||||
UserSettings userSettings = UserController.GetUserSettings(user.UserId, "LyncUserPlansPolicy");
|
||||
|
||||
if (!string.IsNullOrEmpty(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS]))
|
||||
{
|
||||
|
||||
List<LyncUserPlan> list = new List<LyncUserPlan>();
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(list.GetType());
|
||||
|
||||
StringReader reader = new StringReader(userSettings[UserSettings.DEFAULT_LYNCUSERPLANS]);
|
||||
|
||||
list = (List<LyncUserPlan>)serializer.Deserialize(reader);
|
||||
|
||||
foreach (LyncUserPlan p in list)
|
||||
{
|
||||
LyncController.AddLyncUserPlan(itemId, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
@ -62,6 +62,12 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return LyncController.GetLyncUsers(itemId, sortColumn, sortDirection, startRow, maximumRows);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public List<LyncUser> GetLyncUsersByPlanId(int itemId, int planId)
|
||||
{
|
||||
return LyncController.GetLyncUsersByPlanId(itemId, planId);
|
||||
}
|
||||
|
||||
[WebMethod]
|
||||
public IntResult GetLyncUserCount(int itemId)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue