Jordi Llach Fernandez (Migrated from SEC-2842) said:
If no ConfigAttributes are supported by the voter by letting RoleVoter.vote do its bussiness without prior filtering useless calls to extractAuthorities are done
I've just overriden RoleHierarchyVoter.vote, which really belongs to RoleVoter, as follows
@Override
public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) {
List<ConfigAttribute> sup = attributes.stream().filter(a -> this.supports(a)).collect(Collectors.toList());
if (!sup.isEmpty()) return super.vote(authentication, object, sup);
else return ACCESS_ABSTAIN;
}
Jordi Llach Fernandez (Migrated from SEC-2842) said:
If no ConfigAttributes are supported by the voter by letting RoleVoter.vote do its bussiness without prior filtering useless calls to extractAuthorities are done
I've just overriden RoleHierarchyVoter.vote, which really belongs to RoleVoter, as follows