Fixed: MailboxEmailAddresses unable to select userprincipalName

Fixed: MailboxEmailAddresses after trying to delete userPrincipalName, warning
displayed
This commit is contained in:
robvde 2012-11-28 08:25:53 +04:00
parent 6dbef1e166
commit 4b631cff90
5 changed files with 43 additions and 37 deletions

View file

@ -5,11 +5,19 @@
</configSections>
<!-- Connection strings -->
<connectionStrings>
<add name="EnterpriseServer" connectionString="Server=(local)\SQLExpress;Database=WebsitePanel;uid=sa;pwd=Password12" providerName="System.Data.SqlClient" />
<!--
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
<add name="EnterpriseServer" connectionString="server=HSTWSP01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=pserxfbnlc6hwmdedbp0;" providerName="System.Data.SqlClient" />
-->
<add name="EnterpriseServer" connectionString="server=HSTPROV01;database=WebsitePanelMerge;uid=WebsitePanel;pwd=aj7ep6fyhmw3b5qeth7c;" />
</connectionStrings>
<appSettings>
<!-- Encryption util settings -->
<add key="WebsitePanel.CryptoKey" value="1234567890" />
<!-- A1D4KDHUE83NKHddF -->
<!--
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
<add key="WebsitePanel.CryptoKey" value="fr2ym4wn2gmbrj7dz336" />
-->
<add key="WebsitePanel.CryptoKey" value="3x7eqt7zabc5n5afs6dg" />
<!-- A1D4KDHUE83NKHddF -->
<add key="WebsitePanel.EncryptionEnabled" value="true" />
<!-- Web Applications -->

View file

@ -3336,6 +3336,10 @@
<data name="Warning.DIST_LIST_SELECT_EMAILS_TO_DELETE" xml:space="preserve">
<value>Please select E-mail address you want to delete from Distribution List</value>
</data>
<data name="Warning.NOT_ALL_EMAIL_ADDRESSES_DELETED" xml:space="preserve">
<value>Please note not all email address are deleted</value>
</data>
<data name="Warning.EXCHANGE_NONE_PUBLIC_FOLDER_TO_DELETE" xml:space="preserve">
<value>There are no public folders to delete</value>
</data>

View file

@ -73,7 +73,7 @@
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:SelectAllCheckboxes(this);" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="chkSelect" runat="server" Enabled='<%# !((bool)Eval("IsPrimary") | (bool)Eval("IsUserPrincipalName"))%>' />
<asp:CheckBox ID="chkSelect" runat="server" Enabled='<%# !(bool)Eval("IsPrimary")%>' />
</ItemTemplate>
<ItemStyle Width="10px" />
</asp:TemplateField>

View file

@ -163,13 +163,30 @@ namespace WebsitePanel.Portal.ExchangeServer
{
// get selected e-mail addresses
List<string> emails = new List<string>();
bool containsUPN = false;
EntServer.ExchangeEmailAddress[] tmpEmails = ES.Services.ExchangeServer.GetMailboxEmailAddresses( PanelRequest.ItemID, PanelRequest.AccountID);
for (int i = 0; i < gvEmails.Rows.Count; i++)
{
GridViewRow row = gvEmails.Rows[i];
CheckBox chkSelect = (CheckBox)row.FindControl("chkSelect");
if (chkSelect.Checked)
{
emails.Add(gvEmails.DataKeys[i].Value.ToString());
foreach (EntServer.ExchangeEmailAddress tmpEmail in tmpEmails)
{
if (gvEmails.DataKeys[i].Value.ToString() == tmpEmail.EmailAddress)
{
if (tmpEmail.IsUserPrincipalName)
{
containsUPN = true;
break;
}
}
}
}
}
if (emails.Count == 0)
@ -187,6 +204,11 @@ namespace WebsitePanel.Portal.ExchangeServer
messageBox.ShowResultMessage(result);
return;
}
else
{
if (containsUPN)
messageBox.ShowWarningMessage("NOT_ALL_EMAIL_ADDRESSES_DELETED");
}
// rebind
BindEmails();

View file

@ -1,31 +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.