@@ -182,7 +182,7 @@ public class AuthService {
|
|||||||
TariffInfo tariffInfo = company.getTariffInfo();
|
TariffInfo tariffInfo = company.getTariffInfo();
|
||||||
|
|
||||||
Long maxUsers = tariffInfo.getTariff().getMaxUsers();
|
Long maxUsers = tariffInfo.getTariff().getMaxUsers();
|
||||||
long currentCountUsers = userRepository.findByCompanyId(company.getId()).size();
|
long currentCountUsers = userRepository.countByCompanyId(company.getId());
|
||||||
|
|
||||||
//TODO add exception
|
//TODO add exception
|
||||||
if (currentCountUsers < maxUsers) {
|
if (currentCountUsers < maxUsers) {
|
||||||
|
|||||||
Reference in New Issue
Block a user