org.pentaho.platform.security.policy.rolebased.springsecurity
Class AuthorizationPolicyVoter
java.lang.Object
org.pentaho.platform.security.policy.rolebased.springsecurity.AuthorizationPolicyVoter
- All Implemented Interfaces:
- org.springframework.security.vote.AccessDecisionVoter
public class AuthorizationPolicyVoter
- extends Object
- implements org.springframework.security.vote.AccessDecisionVoter
An AccessDecisionVoter
that delegates to an IAuthorizationPolicy
instance.
- Author:
- mlowery
Fields inherited from interface org.springframework.security.vote.AccessDecisionVoter |
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED |
Method Summary |
boolean |
supports(Class clazz)
This implementation supports any type of class, because it does not query
the presented secure object. |
boolean |
supports(org.springframework.security.ConfigAttribute attribute)
|
int |
vote(org.springframework.security.Authentication authentication,
Object object,
org.springframework.security.ConfigAttributeDefinition config)
|
AuthorizationPolicyVoter
public AuthorizationPolicyVoter(IAuthorizationPolicy policy,
String prefix)
supports
public boolean supports(org.springframework.security.ConfigAttribute attribute)
- Specified by:
supports
in interface org.springframework.security.vote.AccessDecisionVoter
supports
public boolean supports(Class clazz)
- This implementation supports any type of class, because it does not query
the presented secure object.
- Specified by:
supports
in interface org.springframework.security.vote.AccessDecisionVoter
- Parameters:
clazz
- the secure object
- Returns:
- always
true
vote
public int vote(org.springframework.security.Authentication authentication,
Object object,
org.springframework.security.ConfigAttributeDefinition config)
- Specified by:
vote
in interface org.springframework.security.vote.AccessDecisionVoter