public class AccessControlListTag
extends javax.servlet.jsp.tagext.TagSupport
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.
These permissions are then converted into Permission instances. These instances are then presented as an
array to the Acl.isGranted(Permission[], org.springframework.security.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.
| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.commons.logging.Log |
logger |
| Constructor and Description |
|---|
AccessControlListTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doStartTag() |
protected org.springframework.context.ApplicationContext |
getContext(javax.servlet.jsp.PageContext pageContext)
Allows test cases to override where application context obtained from.
|
java.lang.Object |
getDomainObject() |
java.lang.String |
getHasPermission() |
void |
setDomainObject(java.lang.Object domainObject) |
void |
setHasPermission(java.lang.String hasPermission) |
public int doStartTag()
throws javax.servlet.jsp.JspException
doStartTag in interface javax.servlet.jsp.tagext.TagdoStartTag in class javax.servlet.jsp.tagext.TagSupportjavax.servlet.jsp.JspExceptionprotected org.springframework.context.ApplicationContext getContext(javax.servlet.jsp.PageContext pageContext)
pageContext - so the ServletContext can be accessed as required by Spring's
WebApplicationContextUtilsnull)public java.lang.Object getDomainObject()
public java.lang.String getHasPermission()
public void setDomainObject(java.lang.Object domainObject)
public void setHasPermission(java.lang.String hasPermission)