Package org.springframework.security.vote

Examples of org.springframework.security.vote.AffirmativeBased


          @Inject
          RoleVoter roleVoter;

          public AccessDecisionManager get() {
            final AffirmativeBased p = new AffirmativeBased();
            p.setAllowIfAllAbstainDecisions(false);
            p.setDecisionVoters(Arrays.asList(new AccessDecisionVoter[] { roleVoter }));
            return p;
          }

        }).in(Scopes.SINGLETON);
  }
View Full Code Here


    /**
     * Constructor.
     */
    public UserRoleSecurityController() {
        // Install the default decision manager
        AffirmativeBased adm = new AffirmativeBased();
        adm.setDecisionVoters( Arrays.asList( new RoleVoter[] { new RoleVoter() } ) );
        setAccessDecisionManager( adm );
    }
View Full Code Here

    } else {
      AbstractAccessDecisionManager abstractAccessDecisionManager;
      List voters = new ArrayList();
      voters.add(new RoleVoter());
      if (rule.getComparisonType() == SecurityRule.COMPARISON_ANY) {
        abstractAccessDecisionManager = new AffirmativeBased();
      } else if (rule.getComparisonType() == SecurityRule.COMPARISON_ALL) {
        abstractAccessDecisionManager = new UnanimousBased();
      } else {
        throw new IllegalStateException("Unknown SecurityRule match type: " + rule.getComparisonType());
      }
View Full Code Here

TOP

Related Classes of org.springframework.security.vote.AffirmativeBased

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.