Exchange Shared and Resource mailboxes

This commit is contained in:
dev_amdtel 2014-11-26 17:31:04 +04:00
parent fd023a347d
commit ac3d594fbd
15 changed files with 239 additions and 6 deletions

View file

@ -193,6 +193,9 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedDiskSpace = tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace = tempStats.UsedLitigationHoldSpace;
stats.UsedArchingStorage = tempStats.UsedArchingStorage;
stats.CreatedSharedMailboxes = tempStats.CreatedSharedMailboxes;
stats.CreatedResourceMailboxes = tempStats.CreatedResourceMailboxes;
}
else
{
@ -221,6 +224,9 @@ namespace WebsitePanel.EnterpriseServer
stats.UsedDiskSpace += tempStats.UsedDiskSpace;
stats.UsedLitigationHoldSpace += tempStats.UsedLitigationHoldSpace;
stats.UsedArchingStorage += tempStats.UsedArchingStorage;
stats.CreatedSharedMailboxes += tempStats.CreatedSharedMailboxes;
stats.CreatedResourceMailboxes += tempStats.CreatedResourceMailboxes;
}
}
}
@ -241,6 +247,9 @@ namespace WebsitePanel.EnterpriseServer
stats.AllocatedLitigationHoldSpace = cntx.Quotas[Quotas.EXCHANGE2007_RECOVERABLEITEMSSPACE].QuotaAllocatedValue;
stats.AllocatedArchingStorage = cntx.Quotas[Quotas.EXCHANGE2013_ARCHIVINGSTORAGE].QuotaAllocatedValue;
stats.AllocatedSharedMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_SHAREDMAILBOXES].QuotaAllocatedValue;
stats.AllocatedResourceMailboxes = cntx.Quotas[Quotas.EXCHANGE2013_RESOURCEMAILBOXES].QuotaAllocatedValue;
return stats;
}
catch (Exception ex)
@ -1665,8 +1674,21 @@ namespace WebsitePanel.EnterpriseServer
// check mailbox quota
OrganizationStatistics orgStats = GetOrganizationStatistics(itemId);
if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
if (accountType == ExchangeAccountType.SharedMailbox)
{
if ((orgStats.AllocatedSharedMailboxes > -1) && (orgStats.CreatedSharedMailboxes >= orgStats.AllocatedSharedMailboxes))
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
}
else if (accountType == ExchangeAccountType.ResourceMailbox)
{
if ((orgStats.AllocatedResourceMailboxes > -1) && (orgStats.CreatedResourceMailboxes >= orgStats.AllocatedResourceMailboxes))
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
}
else
{
if ((orgStats.AllocatedMailboxes > -1) && (orgStats.CreatedMailboxes >= orgStats.AllocatedMailboxes))
return BusinessErrorCodes.ERROR_EXCHANGE_MAILBOXES_QUOTA_LIMIT;
}
// place log record