コード例 #1
0
 @Bean
 public AccessDecisionManager shellAccessDecisionManager() {
   List<AccessDecisionVoter<?>> voters = new ArrayList<AccessDecisionVoter<?>>();
   RoleVoter voter = new RoleVoter();
   voter.setRolePrefix("");
   voters.add(voter);
   return new UnanimousBased(voters);
 }
コード例 #2
0
 @Bean
 public AccessDecisionManager accessDecisionManager() {
   List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>();
   RoleVoter voter = new RoleVoter();
   voter.setRolePrefix("");
   voters.add(voter);
   AccessDecisionManager result = new UnanimousBased(voters);
   return result;
 }
コード例 #3
0
 @Bean
 public SecurityController authorityConfigurableSecurityController() {
   AuthorityConfigurableSecurityController authorityConfigurableSecurityController =
       new AuthorityConfigurableSecurityController();
   Map<String, String> idAuthorityMap = Maps.newHashMap();
   configureAuthorityMap(idAuthorityMap);
   authorityConfigurableSecurityController.setIdAuthorityMap(idAuthorityMap);
   AffirmativeBased accessDecisionManager = new AffirmativeBased();
   RoleVoter roleVoter = new RoleVoter();
   roleVoter.setRolePrefix("");
   accessDecisionManager.setDecisionVoters(Lists.<AccessDecisionVoter>newArrayList(roleVoter));
   authorityConfigurableSecurityController.setAccessDecisionManager(accessDecisionManager);
   return authorityConfigurableSecurityController;
 }