mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-24 21:12:18 +00:00
Modified to support changes to interface.
This commit is contained in:
parent
cfb99d01c9
commit
8c69eb6abb
@ -55,8 +55,23 @@ public class ContactSecurityVoter implements AccessDecisionVoter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int vote(Authentication authentication, MethodInvocation invocation,
|
public boolean supports(Class clazz) {
|
||||||
|
if (MethodInvocation.class.isAssignableFrom(clazz)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int vote(Authentication authentication, Object object,
|
||||||
ConfigAttributeDefinition config) {
|
ConfigAttributeDefinition config) {
|
||||||
|
if ((object == null) || !this.supports(object.getClass())) {
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"Does not support the presented Object type");
|
||||||
|
}
|
||||||
|
|
||||||
|
MethodInvocation invocation = (MethodInvocation) object;
|
||||||
|
|
||||||
int result = ACCESS_ABSTAIN;
|
int result = ACCESS_ABSTAIN;
|
||||||
Iterator iter = config.getConfigAttributes();
|
Iterator iter = config.getConfigAttributes();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user