org.pentaho.platform.engine.security.acls.voter
Class PentahoAllowAllAclVoter

java.lang.Object
  extended by org.pentaho.platform.engine.security.acls.voter.AbstractPentahoAclVoter
      extended by org.pentaho.platform.engine.security.acls.voter.PentahoAllowAllAclVoter
All Implemented Interfaces:
IAclVoter, IPentahoInitializer

public class PentahoAllowAllAclVoter
extends AbstractPentahoAclVoter


Constructor Summary
PentahoAllowAllAclVoter()
           
 
Method Summary
 org.springframework.security.Authentication getAuthentication(IPentahoSession session)
           
 IPentahoAclEntry getEffectiveAcl(IPentahoSession session, IAclHolder holder)
          This returns the effective ACL for the piece of content for the given user.
 org.springframework.security.acl.AclEntry[] getEffectiveAcls(IPentahoSession session, IAclHolder holder)
          Returns an array of the authorities from the IAclHolder that apply to the provided authentication object.
 boolean hasAccess(IPentahoSession session, IAclHolder holder, int mask)
          Determines whether the user (auth) has the requested authority (mask) based on the list of effective authorities from the holder.
 boolean isGranted(IPentahoSession session, org.springframework.security.GrantedAuthority auth)
          Returns true if the user is a member of the specified role
 boolean isPentahoAdministrator(IPentahoSession session)
          Determines whether the user is a super-manager of Pentaho.
 
Methods inherited from class org.pentaho.platform.engine.security.acls.voter.AbstractPentahoAclVoter
getAdminRole, init, setAdminRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PentahoAllowAllAclVoter

public PentahoAllowAllAclVoter()
Method Detail

hasAccess

public boolean hasAccess(IPentahoSession session,
                         IAclHolder holder,
                         int mask)
Description copied from interface: IAclVoter
Determines whether the user (auth) has the requested authority (mask) based on the list of effective authorities from the holder.

Returns:
true if the user has the requested access.

getAuthentication

public org.springframework.security.Authentication getAuthentication(IPentahoSession session)
Specified by:
getAuthentication in class AbstractPentahoAclVoter

getEffectiveAcls

public org.springframework.security.acl.AclEntry[] getEffectiveAcls(IPentahoSession session,
                                                                    IAclHolder holder)
Description copied from interface: IAclVoter
Returns an array of the authorities from the IAclHolder that apply to the provided authentication object. mlowery In practice this method does not do the same thing as EffectiveAclsResolver.

Returns:
The array of authorities from the IAclHolder that apply to the person in question

getEffectiveAcl

public IPentahoAclEntry getEffectiveAcl(IPentahoSession session,
                                        IAclHolder holder)
Description copied from interface: IAclVoter
This returns the effective ACL for the piece of content for the given user. Ideally, this will look at all the effective ACLs returned for this user for this piece of content, and return an ACL that encapsulates all the users' access to that content. The returning PentahoAclEntry will represent the ACL that the user has to the content. This method should NEVER return null. If the user has no access to the object, it needs to return a PentahoAclEntry with nothing (mask of 0).

Returns:
PentahoAclEntry holding the access to the object.

isPentahoAdministrator

public boolean isPentahoAdministrator(IPentahoSession session)
Description copied from interface: IAclVoter
Determines whether the user is a super-manager of Pentaho. Uses the Manager Role.

Specified by:
isPentahoAdministrator in interface IAclVoter
Overrides:
isPentahoAdministrator in class AbstractPentahoAclVoter
Returns:
true if the user is a super-manager

isGranted

public boolean isGranted(IPentahoSession session,
                         org.springframework.security.GrantedAuthority auth)
Description copied from interface: IAclVoter
Returns true if the user is a member of the specified role

Specified by:
isGranted in interface IAclVoter
Overrides:
isGranted in class AbstractPentahoAclVoter
Returns:
true if the user is a member of the specified role