org.acegisecurity.taglibs.authz
Class AccessControlListTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.acegisecurity.taglibs.authz.AccessControlListTag
- All Implemented Interfaces:
- Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class AccessControlListTag
- extends javax.servlet.jsp.tagext.TagSupport
An implementation of Tag that allows its body through if some authorizations
are granted to the request's principal.
One or more comma separate numeric are specified via the
hasPermission attribute. Those permissions are then converted into Permission instances. These
instances are then presented as an array to the Acl.isGranted(Permission[],
org.acegisecurity.acls.sid.Sid[], boolean) method. The Sid presented is determined by the SidRetrievalStrategy.
For this class to operate it must be able to access the application context via the
WebApplicationContextUtils and locate an AclService and SidRetrievalStrategy.
Application contexts must provide one and only one of these Java types.
- Version:
- $Id: AccessControlListTag.java 1754 2006-11-17 02:01:21Z benalex $
- Author:
- Ben Alex
- See Also:
- Serialized Form
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final Log logger
AccessControlListTag
public AccessControlListTag()
doStartTag
public int doStartTag()
throws javax.servlet.jsp.JspException
- Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag- Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
- Throws:
javax.servlet.jsp.JspException
getContext
protected ApplicationContext getContext(javax.servlet.jsp.PageContext pageContext)
- Allows test cases to override where application context obtained from.
- Parameters:
pageContext - so the ServletContext can be accessed as required by Spring's
WebApplicationContextUtils
- Returns:
- the Spring application context (never
null)
getDomainObject
public Object getDomainObject()
getHasPermission
public String getHasPermission()
setDomainObject
public void setDomainObject(Object domainObject)
setHasPermission
public void setHasPermission(String hasPermission)
Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.