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

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

public class PentahoUserOverridesVoter
extends PentahoBasicAclVoter

Extends the PentahoBasicAclVoter class, and overrides the getEffectiveAcls method to stipulate that if the current user occurrs in the access control list, that whatever access controls are listed for that user, those are the only ones returned.

For example, if the user (sally) belongs to the following roles:

   
User IdRole
sallydev
mgr
And the object has the following defined access controls:
   
RoleAccess
devExecute
salesExecute and Subscribe
sallyNothing
With the standard PentahoBasicAclVoter, sally would have Execute permissions on this object because that voter will simply aggregate all applicable access controls. With this voter, the returned access controls for sally will be PentahoAclEntry.NOTHING.

Author:
mbatchel

Constructor Summary
PentahoUserOverridesVoter()
           
 
Method Summary
 AclEntry[] getEffectiveAcls(IPentahoSession session, IAclHolder holder)
          Returns an array of the authorities from the IAclHolder that apply to the provided authentication object.
 
Methods inherited from class org.pentaho.platform.engine.security.acls.voter.PentahoBasicAclVoter
getAuthentication, getEffectiveAcl, hasAccess
 
Methods inherited from class org.pentaho.platform.engine.security.acls.voter.AbstractPentahoAclVoter
getAdminRole, init, isGranted, isPentahoAdministrator, setAdminRole
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.pentaho.platform.api.engine.IAclVoter
getAdminRole, isGranted, isPentahoAdministrator, setAdminRole
 

Constructor Detail

PentahoUserOverridesVoter

public PentahoUserOverridesVoter()
Method Detail

getEffectiveAcls

public 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.

Specified by:
getEffectiveAcls in interface IAclVoter
Overrides:
getEffectiveAcls in class PentahoBasicAclVoter
Returns:
The array of authorities from the IAclHolder that apply to the person in question