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

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

Introduction

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

Prototype

AffirmativeBased

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:ch.astina.hesperid.web.services.SecurityModule.java

/**
 * Decides uppon access to an object. It passes the object to a list of <code>RoleVoter</code>s.
 * Based on the AccessDecisionManager's implementation, access is granted or denied.
 *///from  w  w  w .j  a v a 2 s  .  c  o m
@Marker(SpringSecurityServices.class)
public final AccessDecisionManager buildAccessDecisionManager(final List<AccessDecisionVoter> voters)
        throws Exception {
    AffirmativeBased manager = new AffirmativeBased();
    manager.setDecisionVoters(voters);
    manager.afterPropertiesSet();
    return manager;
}