Example usage for org.springframework.security.access.vote AffirmativeBased setAllowIfAllAbstainDecisions

List of usage examples for org.springframework.security.access.vote AffirmativeBased setAllowIfAllAbstainDecisions

Introduction

In this page you can find the example usage for org.springframework.security.access.vote AffirmativeBased setAllowIfAllAbstainDecisions.

Prototype

public void setAllowIfAllAbstainDecisions(boolean allowIfAllAbstainDecisions) 

Source Link

Usage

From source file:com.apress.prospringintegration.security.SecurityConfiguration.java

@Bean
public AffirmativeBased accessDecisionManager() {
    AffirmativeBased affirmativeBased = new AffirmativeBased();
    affirmativeBased.setAllowIfAllAbstainDecisions(true);
    affirmativeBased.setDecisionVoters(Arrays.asList((AccessDecisionVoter) new RoleVoter()));

    return affirmativeBased;
}

From source file:com.muk.spring.config.SpringSecurityConfig.java

@Bean(name = "camelAccessDecisionManager")
public AccessDecisionManager accessDecisionManager() {
    final List<AccessDecisionVoter<? extends Object>> voters = new ArrayList<AccessDecisionVoter<? extends Object>>();
    voters.add(new RoleVoter());

    final AffirmativeBased decisionManager = new AffirmativeBased(voters);
    decisionManager.setAllowIfAllAbstainDecisions(true);

    return decisionManager;
}