use of fi.otavanopisto.pyramus.framework.UserRole in project pyramus by otavanopisto.
the class AdminPasswordSetupWizardViewController method getAllowedRoles.
@Override
public UserRole[] getAllowedRoles() {
StaffMemberDAO userDAO = DAOFactory.getInstance().getStaffMemberDAO();
List<StaffMember> users = userDAO.listAll();
if (users.isEmpty()) {
return new UserRole[] { UserRole.EVERYONE };
} else {
return super.getAllowedRoles();
}
}
Aggregations