Added check for admin user and test it
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
@ -85,4 +85,8 @@ public class UserService {
|
||||
return this.repo.getByRefreshToken(refreshToken);
|
||||
}
|
||||
|
||||
public boolean adminExists(){
|
||||
return this.repo.getAllByRole(UserRoles.ADMIN).size() > 0;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user