Example usage for org.springframework.security.web.access.expression WebExpressionVoter WebExpressionVoter

List of usage examples for org.springframework.security.web.access.expression WebExpressionVoter WebExpressionVoter

Introduction

In this page you can find the example usage for org.springframework.security.web.access.expression WebExpressionVoter WebExpressionVoter.

Prototype

WebExpressionVoter

Source Link

Usage

From source file:org.jtalks.poulpe.security.AclAwareDecisionVoter.java

/** Constructor used for initialization from Spring IoC */
public AclAwareDecisionVoter(UserService userService) {
    this(new WebExpressionVoter(), userService);
}

From source file:org.italiangrid.storm.webdav.spring.web.SecurityConfig.java

@Bean
public AccessDecisionManager accessDecisionManager() {

    @SuppressWarnings("rawtypes")
    List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>();
    voters.add(new WebExpressionVoter());
    voters.add(customVoter());/*from  w ww  .java 2 s  .  co  m*/

    return new UnanimousBased(voters);
}

From source file:org.jblogcms.core.config.SecurityContext.java

@Bean
public AffirmativeBased getAccessDecisionManager(RoleHierarchy roleHierarchy) {
    DefaultWebSecurityExpressionHandler expressionHandler = new DefaultWebSecurityExpressionHandler();
    expressionHandler.setRoleHierarchy(roleHierarchy);

    WebExpressionVoter webExpressionVoter = new WebExpressionVoter();
    webExpressionVoter.setExpressionHandler(expressionHandler);

    List<AccessDecisionVoter<? extends Object>> voters = new ArrayList<AccessDecisionVoter<? extends Object>>();

    voters.add(webExpressionVoter);//ww  w  . j  ava  2s. c om
    return new AffirmativeBased(voters);
}

From source file:org.davidmendoza.esu.config.SecurityConfig.java

@Bean
@SuppressWarnings("unchecked")
public AccessDecisionManager defaultAccessDecisionManager() {
    DefaultWebSecurityExpressionHandler defaultWebSecurityExpressionHandler = new DefaultWebSecurityExpressionHandler();
    defaultWebSecurityExpressionHandler.setRoleHierarchy(roleHierarchy());
    WebExpressionVoter webExpressionVoter = new WebExpressionVoter();
    webExpressionVoter.setExpressionHandler(defaultWebSecurityExpressionHandler);
    List voters = new ArrayList<>();
    voters.add(webExpressionVoter);//from   w  w w.  ja  va  2s. c om
    AccessDecisionManager result = new AffirmativeBased(voters);
    return result;
}

From source file:org.wallride.autoconfigure.WallRideSecurityConfiguration.java

@Bean
public WebExpressionVoter webExpressionVoter() {
    WebExpressionVoter webExpressionVoter = new WebExpressionVoter();
    webExpressionVoter.setExpressionHandler(webSecurityExpressionHandler());
    return webExpressionVoter;
}