fix for issue wsp-1029, cannot import mail domain if quota of groups or lists is set to 0

This commit is contained in:
Olov Karlsson 2014-12-27 18:49:16 +01:00
parent 5ac2c83006
commit 3c5cac21b6

View file

@ -1505,6 +1505,13 @@ namespace WebsitePanel.EnterpriseServer
/// <returns>True if quota will exceed. Otherwise, false.</returns>
protected bool VerifyIfQuotaWillBeExceeded(int packageId, string quotaName, int numberOfItemsToAdd)
{
// Don't bother to check quota if the number of items to add is zero or less otherwise IsQuotasWillExceed
// will fail when quota is set to 0 on lists or groups and still thera are no items to import
if (numberOfItemsToAdd <= 0)
{
return false;
}
bool result = false;
QuotaValueInfo quotaInfo = PackageController.GetPackageQuota(packageId, quotaName);