Added check for admin user and test it

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-12-23 13:48:26 +01:00
parent 165dee5bd2
commit da46582fc0
3 changed files with 26 additions and 0 deletions

View File

@ -85,4 +85,8 @@ public class UserService {
return this.repo.getByRefreshToken(refreshToken);
}
public boolean adminExists(){
return this.repo.getAllByRole(UserRoles.ADMIN).size() > 0;
}
}