org.pentaho.platform.security.policy.rolebased.springsecurity
Class AuthorizationPolicyVoter

java.lang.Object
  extended by 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

Field Summary
 
Fields inherited from interface org.springframework.security.vote.AccessDecisionVoter
ACCESS_ABSTAIN, ACCESS_DENIED, ACCESS_GRANTED
 
Constructor Summary
AuthorizationPolicyVoter(IAuthorizationPolicy policy, String prefix)
           
 
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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorizationPolicyVoter

public AuthorizationPolicyVoter(IAuthorizationPolicy policy,
                                String prefix)
Method Detail

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