mirror of
https://github.com/Athou/commafeed.git
synced 2026-11-20 10:43:37 +00:00
add a setup landing page instead of creating a default admin account
This commit is contained in:
@@ -32,4 +32,8 @@ public class UserRoleDAO extends GenericDAO<UserRole> {
|
||||
public Set<Role> findRoles(User user) {
|
||||
return findAll(user).stream().map(UserRole::getRole).collect(Collectors.toSet());
|
||||
}
|
||||
|
||||
public long countAdmins() {
|
||||
return query().select(ROLE.count()).from(ROLE).where(ROLE.role.eq(Role.ADMIN)).fetchOne();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user