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
|
@ -132,21 +132,30 @@
|
|||
<data name="cmdDelete.ToolTip" xml:space="preserve">
|
||||
<value>Delete Plan</value>
|
||||
</data>
|
||||
<data name="gvPlans.Empty" xml:space="preserve">
|
||||
<value>No plans have been added yet. To add a new plan click "Add New Plan" button.</value>
|
||||
<data name="gvPlan.Header" xml:space="preserve">
|
||||
<value>Plan</value>
|
||||
</data>
|
||||
<data name="gvPlanDefault.Header" xml:space="preserve">
|
||||
<value>Default Plan</value>
|
||||
</data>
|
||||
<data name="gvPlan.Header" xml:space="preserve">
|
||||
<value>Plan</value>
|
||||
<data name="gvPlans.Empty" xml:space="preserve">
|
||||
<value>No plans have been added yet. To add a new plan click "Add New Plan" button.</value>
|
||||
</data>
|
||||
<data name="HSFormComments.Text" xml:space="preserve">
|
||||
<value><p> A plan is a template that defines the capabilities of a lync users </p> <p>The plan name needs to be unique. A plan cannot be modified. In case a lync user needs a plan with another characteristics, a new plan needs to be created and assigned to the lync user. A plan can only be deleted when the plan is not assigned to any lync users. </p></value>
|
||||
</data>
|
||||
<data name="locSourcePlan.Text" xml:space="preserve">
|
||||
<value>Source plan: </value>
|
||||
</data>
|
||||
<data name="locTargetPlan.Text" xml:space="preserve">
|
||||
<value>Target plan: </value>
|
||||
</data>
|
||||
<data name="locTitle.Text" xml:space="preserve">
|
||||
<value>Lync User Plans</value>
|
||||
</data>
|
||||
<data name="secMainTools.Text" xml:space="preserve">
|
||||
<value>Lync User plan maintenance</value>
|
||||
</data>
|
||||
<data name="Text.PageName" xml:space="preserve">
|
||||
<value>Lync User Plans</value>
|
||||
</data>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -33,17 +33,17 @@ using WebsitePanel.Providers.ResultObjects;
|
|||
|
||||
namespace WebsitePanel.Portal.Lync
|
||||
{
|
||||
public partial class LyncAddLyncUserPlan : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
public partial class LyncAddLyncUserPlan : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (PanelRequest.GetInt("LyncUserPlanId") != 0)
|
||||
{
|
||||
Providers.HostedSolution.LyncUserPlan plan = ES.Services.Lync.GetLyncUserPlan(PanelRequest.ItemID, PanelRequest.GetInt("LyncUserPlanId"));
|
||||
|
||||
|
||||
txtPlan.Text = plan.LyncUserPlanName;
|
||||
chkIM.Checked = plan.IM;
|
||||
chkIM.Enabled = false;
|
||||
|
@ -71,7 +71,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
chkNone.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
locTitle.Text = plan.LyncUserPlanName;
|
||||
this.DisableControls = true;
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -120,7 +120,7 @@ namespace WebsitePanel.Portal.Lync
|
|||
try
|
||||
{
|
||||
Providers.HostedSolution.LyncUserPlan plan = new Providers.HostedSolution.LyncUserPlan();
|
||||
plan.LyncUserPlanName = txtPlan.Text;
|
||||
plan.LyncUserPlanName = txtPlan.Text;
|
||||
plan.IsDefault = false;
|
||||
|
||||
plan.IM = true;
|
||||
|
@ -134,8 +134,22 @@ namespace WebsitePanel.Portal.Lync
|
|||
{
|
||||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (chkEmergency.Checked)
|
||||
plan.VoicePolicy = LyncVoicePolicyType.Emergency;
|
||||
else if (chkNational.Checked)
|
||||
plan.VoicePolicy = LyncVoicePolicyType.National;
|
||||
else if (chkMobile.Checked)
|
||||
plan.VoicePolicy = LyncVoicePolicyType.Mobile;
|
||||
else if (chkInternational.Checked)
|
||||
plan.VoicePolicy = LyncVoicePolicyType.International;
|
||||
else
|
||||
plan.VoicePolicy = LyncVoicePolicyType.None;
|
||||
|
||||
int result = ES.Services.Lync.AddLyncUserPlan( PanelRequest.ItemID,
|
||||
}
|
||||
|
||||
int result = ES.Services.Lync.AddLyncUserPlan(PanelRequest.ItemID,
|
||||
plan);
|
||||
|
||||
|
||||
|
@ -153,5 +167,5 @@ namespace WebsitePanel.Portal.Lync
|
|||
messageBox.ShowErrorMessage("LYNC_ADD_PLAN", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,32 +1,3 @@
|
|||
// Copyright (c) 2012, 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.
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
<%@ Register Src="../ExchangeServer/UserControls/Menu.ascx" TagName="Menu" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../ExchangeServer/UserControls/Breadcrumb.ascx" TagName="Breadcrumb" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/QuotaViewer.ascx" TagName="QuotaViewer" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/CollapsiblePanel.ascx" TagName="CollapsiblePanel" TagPrefix="wsp" %>
|
||||
<%@ Register Src="UserControls/LyncUserPlanSelector.ascx" TagName="LyncUserPlanSelector" TagPrefix="wsp" %>
|
||||
<%@ Register Src="../UserControls/EnableAsyncTasksSupport.ascx" TagName="EnableAsyncTasksSupport" TagPrefix="wsp" %>
|
||||
|
||||
<wsp:EnableAsyncTasksSupport id="asyncTasks" runat="server"/>
|
||||
|
@ -63,6 +65,43 @@
|
|||
Text="Set Default Plan" CssClass="Button1" OnClick="btnSetDefaultPlan_Click" />
|
||||
</div>
|
||||
|
||||
<wsp:CollapsiblePanel id="secMainTools" runat="server" IsCollapsed="true" TargetControlID="ToolsPanel" meta:resourcekey="secMainTools" Text="Lync user plan maintenance">
|
||||
</wsp:CollapsiblePanel>
|
||||
<asp:Panel ID="ToolsPanel" runat="server" Height="0" Style="overflow: hidden;">
|
||||
<table id="tblMaintenance" runat="server" cellpadding="10">
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="lblSourcePlan" runat="server" meta:resourcekey="locSourcePlan" Text="Replace"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:LyncUserPlanSelector ID="lyncUserPlanSelectorSource" runat="server" AddNone="true"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="FormLabel150"><asp:Localize ID="lblTargetPlan" runat="server" meta:resourcekey="locTargetPlan" Text="With"></asp:Localize></td>
|
||||
<td>
|
||||
<wsp:LyncUserPlanSelector ID="lyncUserPlanSelectorTarget" runat="server" AddNone="false"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox ID="txtStatus" runat="server" CssClass="TextBox200" MaxLength="128" ReadOnly="true"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="FormFooterClean">
|
||||
<asp:Button id="btnSave" runat="server" Text="Stamp Lync Users" CssClass="Button1"
|
||||
meta:resourcekey="btnSave" OnClick="btnSave_Click" OnClientClick = "ShowProgressDialog('Stamping mailboxes, this might take a while ...');"> </asp:Button>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Panel>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="Right">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 2011, Outercurve Foundation.
|
||||
// Copyright (c) 2012, Outercurve Foundation.
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -30,19 +30,37 @@ using System;
|
|||
using System.Web.UI.WebControls;
|
||||
using WebsitePanel.EnterpriseServer;
|
||||
using WebsitePanel.Providers.HostedSolution;
|
||||
using WebsitePanel.Providers.ResultObjects;
|
||||
|
||||
namespace WebsitePanel.Portal.Lync
|
||||
{
|
||||
public partial class LyncUserPlans : WebsitePanelModuleBase
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindPlans();
|
||||
}
|
||||
|
||||
}
|
||||
txtStatus.Visible = false;
|
||||
|
||||
if (PanelSecurity.LoggedUser.Role == UserRole.User)
|
||||
{
|
||||
PackageContext cntx = PackagesHelper.GetCachedPackageContext(PanelSecurity.PackageId);
|
||||
if (cntx.Quotas.ContainsKey(Quotas.LYNC_ENABLEDPLANSEDITING))
|
||||
{
|
||||
if (cntx.Quotas[Quotas.LYNC_ENABLEDPLANSEDITING].QuotaAllocatedValue != 1)
|
||||
{
|
||||
gvPlans.Columns[2].Visible = false;
|
||||
btnAddPlan.Enabled = btnAddPlan.Visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string GetPlanDisplayUrl(string LyncUserPlanId)
|
||||
{
|
||||
|
@ -64,6 +82,8 @@ namespace WebsitePanel.Portal.Lync
|
|||
{
|
||||
btnSetDefaultPlan.Enabled = false;
|
||||
}
|
||||
|
||||
btnSave.Enabled = (gvPlans.Rows.Count >= 1);
|
||||
}
|
||||
|
||||
public string IsChecked(bool val)
|
||||
|
@ -121,5 +141,34 @@ namespace WebsitePanel.Portal.Lync
|
|||
ShowErrorMessage("LYNC_SET_DEFAULT_PLAN", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
txtStatus.Visible = true;
|
||||
|
||||
try
|
||||
{
|
||||
LyncUser[] Accounts = ES.Services.Lync.GetLyncUsersByPlanId(PanelRequest.ItemID, Convert.ToInt32(lyncUserPlanSelectorSource.planId));
|
||||
|
||||
foreach (LyncUser a in Accounts)
|
||||
{
|
||||
txtStatus.Text = "Completed";
|
||||
LyncUserResult result = ES.Services.Lync.SetUserLyncPlan(PanelRequest.ItemID, a.AccountID, Convert.ToInt32(lyncUserPlanSelectorTarget.planId));
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
BindPlans();
|
||||
txtStatus.Text = "Error: " + a.DisplayName;
|
||||
ShowErrorMessage("LYNC_FAILED_TO_STAMP");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ShowErrorMessage("LYNC_FAILED_TO_STAMP", ex);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -1,32 +1,3 @@
|
|||
// Copyright (c) 2012, 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.
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
|
@ -122,6 +93,87 @@ namespace WebsitePanel.Portal.Lync {
|
|||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSetDefaultPlan;
|
||||
|
||||
/// <summary>
|
||||
/// secMainTools control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.CollapsiblePanel secMainTools;
|
||||
|
||||
/// <summary>
|
||||
/// ToolsPanel control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Panel ToolsPanel;
|
||||
|
||||
/// <summary>
|
||||
/// tblMaintenance control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlTable tblMaintenance;
|
||||
|
||||
/// <summary>
|
||||
/// lblSourcePlan control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize lblSourcePlan;
|
||||
|
||||
/// <summary>
|
||||
/// lyncUserPlanSelectorSource control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector lyncUserPlanSelectorSource;
|
||||
|
||||
/// <summary>
|
||||
/// lblTargetPlan control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Localize lblTargetPlan;
|
||||
|
||||
/// <summary>
|
||||
/// lyncUserPlanSelectorTarget control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::WebsitePanel.Portal.Lync.UserControls.LyncUserPlanSelector lyncUserPlanSelectorTarget;
|
||||
|
||||
/// <summary>
|
||||
/// txtStatus control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.TextBox txtStatus;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// FormComments control.
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue