Search in sources :

Example 1 with MolgenisAccessDecisionVoter

use of org.molgenis.core.ui.security.MolgenisAccessDecisionVoter in project molgenis by molgenis.

the class WebAppSecurityConfig method configureUrlAuthorization.

// TODO automate URL authorization configuration (ticket #2133)
@Override
protected void configureUrlAuthorization(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry expressionInterceptUrlRegistry) {
    List<AccessDecisionVoter<?>> listOfVoters = new ArrayList<>();
    listOfVoters.add(new WebExpressionVoter());
    listOfVoters.add(new MolgenisAccessDecisionVoter());
    expressionInterceptUrlRegistry.accessDecisionManager(new AffirmativeBased(listOfVoters));
    expressionInterceptUrlRegistry.antMatchers("/").permitAll().antMatchers("/fdp/**").permitAll().antMatchers("/annotators/**").authenticated();
}
Also used : MolgenisAccessDecisionVoter(org.molgenis.core.ui.security.MolgenisAccessDecisionVoter) AffirmativeBased(org.springframework.security.access.vote.AffirmativeBased) ArrayList(java.util.ArrayList) MolgenisAccessDecisionVoter(org.molgenis.core.ui.security.MolgenisAccessDecisionVoter) AccessDecisionVoter(org.springframework.security.access.AccessDecisionVoter) WebExpressionVoter(org.springframework.security.web.access.expression.WebExpressionVoter)

Aggregations

ArrayList (java.util.ArrayList)1 MolgenisAccessDecisionVoter (org.molgenis.core.ui.security.MolgenisAccessDecisionVoter)1 AccessDecisionVoter (org.springframework.security.access.AccessDecisionVoter)1 AffirmativeBased (org.springframework.security.access.vote.AffirmativeBased)1 WebExpressionVoter (org.springframework.security.web.access.expression.WebExpressionVoter)1