Examples of AffirmativeBased


Examples of org.springframework.security.access.vote.AffirmativeBased

    /**
     * Creates the default {@code AccessDecisionManager}
     * @return the default {@code AccessDecisionManager}
     */
    private AccessDecisionManager createDefaultAccessDecisionManager() {
        return new AffirmativeBased(getDecisionVoters());
    }
View Full Code Here

Examples of org.springframework.security.access.vote.AffirmativeBased

        List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>();
        RoleVoter roleVoter = new RoleVoter();
        roleVoter.setRolePrefix("");
        voters.add(roleVoter);
        voters.add(new AuthenticatedVoter());
        AffirmativeBased accessDecisionManager = new AffirmativeBased(voters);
        accessDecisionManager.setAllowIfAllAbstainDecisions(siConfig.isAllowIfAllAbstainDecisions());
        filter.setAccessDecisionManager(accessDecisionManager);       
       
        // TODO, Justin, is this correct
        filter.setSecurityMetadataSource((FilterInvocationSecurityMetadataSource)
                    GeoServerExtensions.bean(siConfig.getSecurityMetadataSource()));
View Full Code Here

Examples of org.springframework.security.access.vote.AffirmativeBased

    @Bean
    @Autowired
    public Filter filterSecurityInterceptor(AuthenticationManager authenticationManager) throws Exception {
        FilterSecurityInterceptor filter = new FilterSecurityInterceptor();
        filter.setAuthenticationManager(authenticationManager);
        filter.setAccessDecisionManager(new AffirmativeBased(asList((AccessDecisionVoter) new RoleVoter())));
        filter.setSecurityMetadataSource(securityMetadataSource());
        filter.afterPropertiesSet();
        return filter;
    }
View Full Code Here

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

Examples of org.springframework.security.vote.AffirmativeBased

    /**
     * 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

Examples of org.springframework.security.vote.AffirmativeBased

    } 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
Copyright © 2018 www.massapi.com. 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.