/** * Retrieves functional points that have no roles mapped to them. * * @return set of {@link GrantedAuthority} representing functional points */ public Set<GrantedAuthority> getUnrestrictedFunctions() { // TODO Getting HerdDao from applicationContext statically because if we try to wire HerdDao here it does not get constructed with proxy class that is // needed for @Cacheable methods to work. SecurityFunctionDao securityFunctionDao = ApplicationContextHolder.getApplicationContext().getBean(SecurityFunctionDao.class); Set<GrantedAuthority> authorities = new HashSet<>(); // Add all unrestricted functional points. for (String function : securityFunctionDao.getUnrestrictedSecurityFunctions()) { authorities.add(new SimpleGrantedAuthority(function)); } return authorities; }
List<String> resultSecurityFunctions = securityFunctionDao.getUnrestrictedSecurityFunctions(); resultSecurityFunctions = securityFunctionDao.getUnrestrictedSecurityFunctions(); resultSecurityFunctions = securityFunctionDao.getUnrestrictedSecurityFunctions();