Quota: fixed quota check

This commit is contained in:
pavelbannov 2023-05-23 17:58:04 +03:00
parent 94388c0616
commit a307be32ba
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ public class CountRoomChecker : TenantQuotaFeatureCheckerCount<CountRoomFeature>
public override void CheckAdd(int tenantId, int newValue)
{
if (_tariffService.GetTariff(tenantId).State > TariffState.Paid)
if (_tariffService.GetTariff(tenantId).State >= TariffState.NotPaid)
{
throw new BillingNotFoundException(Resource.ErrorNotAllowedOption, "room");
}
@ -70,7 +70,7 @@ public class CountRoomCheckerStatistic : ITenantQuotaFeatureStat<CountRoomFeatur
{
return 0;
}
return await folderDao.GetFoldersAsync(parentId).CountAsync();
}
}

View File

@ -41,7 +41,7 @@ public class CountUserChecker : TenantQuotaFeatureCheckerCount<CountUserFeature>
public override void CheckAdd(int tenantId, int newValue)
{
if (_tariffService.GetTariff(tenantId).State > TariffState.Paid)
if (_tariffService.GetTariff(tenantId).State >= TariffState.NotPaid)
{
throw new BillingNotFoundException(Resource.ErrorNotAllowedOption, "users");
}