Fixed: Do not allow to delete a domain when used by hosting organization objects

This commit is contained in:
robvde 2012-11-23 15:54:47 +04:00
parent 18a4608ad2
commit 3e8a53a468
8 changed files with 64 additions and 5 deletions

View file

@ -425,7 +425,15 @@ namespace WebsitePanel.EnterpriseServer
DomainInfo domain = ServerController.GetDomain(domainId);
if (domain == null)
return -1;
if (!string.IsNullOrEmpty(org.GlobalAddressList))
{
if (DataProvider.CheckDomainUsedByHostedOrganization(domain.DomainName) == 1)
{
return -1;
}
}
// unregister domain
DataProvider.DeleteExchangeOrganizationDomain(itemId, domainId);