org.jboss.portal.cms.impl.jcr.command
Class ACLEnforcer
java.lang.Object
org.jboss.portal.cms.impl.jcr.command.ACLEnforcer
public class ACLEnforcer
- extends java.lang.Object
ACLEnforcer checks proper access privileges for actions before the Command objects are allowed to execute and do
their job on the CMS
- Author:
- Sohil Shah - sohil.shah@jboss.com - Nov 28, 2006
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACLEnforcer
public ACLEnforcer(AuthorizationManager authorizationManager)
addACLCommand
protected void addACLCommand(ACLEnforcer.Type type,
java.lang.String commandClassName)
- Add a command to check for security control
- Parameters:
commandClassName
- The fully qualified name of the command
hasAccess
public boolean hasAccess(PortalCMSSecurityContext cmsSecurityContext)
- Parameters:
securityContext
-
- Returns:
hasReadAccess
protected boolean hasReadAccess(User user,
JCRCommand command)
- Parameters:
user
- command
-
- Returns:
hasReadAccess
protected boolean hasReadAccess(User user,
java.lang.String path)
- Parameters:
user
- path
-
- Returns:
hasWriteAccess
protected boolean hasWriteAccess(User user,
JCRCommand command)
- Parameters:
user
- command
-
- Returns:
hasWriteAccess
protected boolean hasWriteAccess(User user,
java.lang.String path)
- Parameters:
user
- path
-
- Returns:
hasManageAccess
protected boolean hasManageAccess(User user,
JCRCommand command)
- Parameters:
user
- command
-
- Returns:
computeAccess
protected boolean computeAccess(User user,
java.lang.String path,
java.lang.String action)