Quota: fixed quota check
This commit is contained in:
parent
94388c0616
commit
a307be32ba
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user