org.pentaho.platform.security.policy.rolebased
Class RoleAuthorizationPolicy

java.lang.Object
  extended by org.pentaho.platform.security.policy.rolebased.RoleAuthorizationPolicy
All Implemented Interfaces:
IAuthorizationPolicy

public class RoleAuthorizationPolicy
extends Object
implements IAuthorizationPolicy

An authorization policy based on roles.

Author:
mlowery

Constructor Summary
RoleAuthorizationPolicy(IRoleAuthorizationPolicyActionBindingDao actionBindingDao, IRoleAuthorizationPolicyRoleBindingDao roleBindingDao)
           
 
Method Summary
 List<String> getAllowedActions(String actionNamespace)
          Returns all actions in the given namespace that are currently allowed.
 boolean isAllowed(String actionName)
          Returns true if the the action should be allowed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleAuthorizationPolicy

public RoleAuthorizationPolicy(IRoleAuthorizationPolicyActionBindingDao actionBindingDao,
                               IRoleAuthorizationPolicyRoleBindingDao roleBindingDao)
Method Detail

getAllowedActions

public List<String> getAllowedActions(String actionNamespace)
Returns all actions in the given namespace that are currently allowed.

Specified by:
getAllowedActions in interface IAuthorizationPolicy
Parameters:
actionNamespace - action namespace (e.g. org.pentaho.di.repository); null means all allowed actions
Returns:
list of actions

isAllowed

public boolean isAllowed(String actionName)
Returns true if the the action should be allowed.

Specified by:
isAllowed in interface IAuthorizationPolicy
Parameters:
actionName - name of action (e.g. org.pentaho.di.repository.create)
Returns:
true to allow