Protect UPN from Deletion when it's not the primary email address

This commit is contained in:
Virtuworks 2014-09-19 21:07:56 -04:00
parent 55bdb407d1
commit bc39c19576
2 changed files with 4 additions and 1 deletions

View file

@ -1347,11 +1347,14 @@ namespace WebsitePanel.EnterpriseServer
if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0) if (String.Compare(account.PrimaryEmailAddress, email.EmailAddress, true) == 0)
{ {
email.IsPrimary = true; email.IsPrimary = true;
email.ProtectDelete = true;
} }
if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0) if (String.Compare(account.UserPrincipalName, email.EmailAddress, true) == 0)
{ {
email.IsUserPrincipalName = true; email.IsUserPrincipalName = true;
email.ProtectDelete = true;
} }
} }

View file

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