org.pentaho.platform.engine.security.acls
Class AclPublisher

java.lang.Object
  extended by org.pentaho.platform.engine.security.acls.AclPublisher
All Implemented Interfaces:
IAclPublisher

public class AclPublisher
extends Object
implements IAclPublisher


Constructor Summary
AclPublisher()
          Default constructor.
AclPublisher(Map<IPermissionRecipient,IPermissionMask> defAcls)
          Constructor that allows overriding the source of the default access control list.
 
Method Summary
 Map<IPermissionRecipient,IPermissionMask> getDefaultAclList()
          Returns an unmodifiable map of default access controls.
 void publishDefaultAcls(IAclSolutionFile rootFile)
          This method is called from the RDBMS repository publish method when publishing a file-based solution to the RDBMS repository.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AclPublisher

public AclPublisher(Map<IPermissionRecipient,IPermissionMask> defAcls)
Constructor that allows overriding the source of the default access control list. This constructor is mainly used from test cases.

Parameters:
defAcls -

AclPublisher

public AclPublisher()
Default constructor. This constructor reads the default access controls from the pentaho.xml. The pentaho.xml needs to have a section similar to the following:

  <acl-publisher>
    <!--
       These acls are used when publishing from the file system. Every folder
       gets these ACLS. Authenticated is a "default" role that everyone
       gets when they're authenticated (be sure to setup your bean xml properly
       for this to work).
    -->
    <default-acls>
       <acl-entry role="Admin" acl="7" /> <!-- Admin users get all authorities -->
       <acl-entry role="cto" acl="7" /> <!-- CTO gets everything -->
       <acl-entry role="dev" acl="6" /> <!-- Dev gets execute/subscribe -->
       <acl-entry role="Authenticated" acl="2" /> <!-- Authenticated users get execute only -->
    </default-acls>
  </acl-publisher>

Method Detail

publishDefaultAcls

public void publishDefaultAcls(IAclSolutionFile rootFile)
This method is called from the RDBMS repository publish method when publishing a file-based solution to the RDBMS repository. This implementation recurses through all the children of the specified IAclSolutionFile, and applies the default access controls only to the

Specified by:
publishDefaultAcls in interface IAclPublisher
Parameters:
rootFile -
See Also:
IAclSolutionFile

getDefaultAclList

public Map<IPermissionRecipient,IPermissionMask> getDefaultAclList()
Returns an unmodifiable map of default access controls.

Returns:
An unmodifiable map containing all the default access controls.