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