本文整理了Java中org.springframework.security.access.vote.UnanimousBased.setDecisionVoters()
方法的一些代码示例,展示了UnanimousBased.setDecisionVoters()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UnanimousBased.setDecisionVoters()
方法的具体详情如下:
包路径:org.springframework.security.access.vote.UnanimousBased
类名称:UnanimousBased
方法名:setDecisionVoters
暂无
代码示例来源:origin: sk.seges.acris/acris-security-spring
@Bean
public UnanimousBased unanonimousDecisionManager() {
UnanimousBased decisionManager = new UnanimousBased();
decisionManager.setAllowIfAllAbstainDecisions(true);
List<AccessDecisionVoter> decissionVoters = new ArrayList<AccessDecisionVoter>();
decissionVoters.add(roleVoter());
decisionManager.setDecisionVoters(decissionVoters);
return decisionManager;
}
代码示例来源:origin: org.codehaus.fabric3/fabric3-spring-security
@Init
public void init() throws SecurityInitException {
if (getDecisionVoters() == null || getDecisionVoters().isEmpty()) {
List<AccessDecisionVoter> voters = new ArrayList<AccessDecisionVoter>();
RoleVoter roleVoter = new RoleVoter();
voters.add(roleVoter);
AuthenticatedVoter authenticatedVoter = new AuthenticatedVoter();
voters.add(authenticatedVoter);
setDecisionVoters(voters);
}
if ("affirmative".equals(managerType)) {
AffirmativeBased affirmativeBased = new AffirmativeBased();
affirmativeBased.setDecisionVoters(getDecisionVoters());
delegate = affirmativeBased;
} else if ("consensus".equals(managerType)) {
ConsensusBased consensusBased = new ConsensusBased();
consensusBased.setDecisionVoters(getDecisionVoters());
delegate = consensusBased;
} else if ("unanimous".equals(managerType)) {
UnanimousBased unanimousBased = new UnanimousBased();
unanimousBased.setDecisionVoters(getDecisionVoters());
delegate = unanimousBased;
} else {
throw new SecurityInitException("Unknown access decision manager type: " + managerType);
}
}
内容来源于网络,如有侵权,请联系作者删除!