SEC-1675: Add missing body-content elements to tag descriptor and update it to use 2.0 tag library schema.

This commit is contained in:
Luke Taylor 2011-02-14 21:17:16 +00:00
parent 088042b3d0
commit 94b7868039
2 changed files with 118 additions and 110 deletions

View File

@ -1,174 +1,178 @@
<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<taglib> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
<tlib-version>1.0</tlib-version> version="2.0">
<jsp-version>1.2</jsp-version> <description>Spring Security Authorization Tag Library</description>
<tlib-version>3.1</tlib-version>
<short-name>security</short-name> <short-name>security</short-name>
<uri>http://www.springframework.org/security/tags</uri> <uri>http://www.springframework.org/security/tags</uri>
<description>
Spring Security Authorization Tag Library
</description>
<tag> <tag>
<name>authorize</name>
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
<description> <description>
A tag which outputs the body of the tag if the configured access expression A tag which outputs the body of the tag if the configured access expression
evaluates to true for the currently authenticated principal. evaluates to true for the currently authenticated principal.
</description> </description>
<name>authorize</name>
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
<body-content>JSP</body-content>
<attribute> <attribute>
<name>access</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A Spring-EL expression which is supported by the WebSecurityExpressionHandler A Spring-EL expression which is supported by the WebSecurityExpressionHandler
in the application context. The latter will be used to evaluate the expression. in the application context. The latter will be used to evaluate the expression.
</description> </description>
<name>access</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A URL within the application. If the user has access to this URL (as determined by A URL within the application. If the user has access to this URL (as determined by
the AccessDecisionManager), the tag body will be evaluated. If not, it will the AccessDecisionManager), the tag body will be evaluated. If not, it will
be skipped. be skipped.
</description> </description>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>method</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Can optionally be used to narrow down the HTTP method (typically GET or POST) to which the URL Can optionally be used to narrow down the HTTP method (typically GET or POST) to which the URL
applies to. Only has any meaning when used in combination with the "url" attribute. applies to. Only has any meaning when used in combination with the "url" attribute.
</description> </description>
<name>method</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the
same condition to be reused subsequently in the page without re-evaluation. same condition to be reused subsequently in the page without re-evaluation.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifNotGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles which the user must not have A comma separated list of roles which the user must not have
for the body to be output. Deprecated in favour of the access expression. for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifNotGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifAllGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles which the user must all A comma separated list of roles which the user must all
possess for the body to be output. Deprecated in favour of the access expression. possess for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifAllGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifAnyGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles, one of which the user must A comma separated list of roles, one of which the user must
possess for the body to be output. Deprecated in favour of the access expression. possess for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifAnyGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
</tag> </tag>
<tag> <tag>
<name>authentication</name>
<tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
<description> <description>
Allows access to the current Authentication object. Allows access to the current Authentication object.
</description> </description>
<name>authentication</name>
<tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
<body-content>empty</body-content>
<attribute> <attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
Property of the Authentication object which should be output. Supports nested Property of the Authentication object which should be output. Supports nested
properties. For example if the principal object is an instance of UserDetails, properties. For example if the principal object is an instance of UserDetails,
the property "principal.username" will return the username. Alternatively, using the property "principal.username" will return the username. Alternatively, using
"name" will call getName method on the Authentication object directly. "name" will call getName method on the Authentication object directly.
</description> </description>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Name of the exported scoped variable which will contain the Name of the exported scoped variable which will contain the
evaluated property of the Authentication object. evaluated property of the Authentication object.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<description>Set HTML escaping for this tag, as a boolean value.</description> <description>
Set HTML escaping for this tag, as a boolean value.
</description>
<name>htmlEscape</name> <name>htmlEscape</name>
<required>false</required> <required>false</required>
<rtexprvalue>true</rtexprvalue> <rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Scope for var. Scope for var.
</description> </description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
</tag> </tag>
<tag> <tag>
<name>accesscontrollist</name>
<tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
<description> <description>
Allows inclusion of a tag body if the current Authentication Allows inclusion of a tag body if the current Authentication
has one of the specified permissions to the presented has one of the specified permissions to the presented
domain object instance. domain object instance.
</description> </description>
<name>accesscontrollist</name>
<tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
<body-content>JSP</body-content>
<attribute> <attribute>
<name>hasPermission</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of permissions, which will be converted to A comma separated list of permissions, which will be converted to
Permission instances by the configured PermissionFactory. Permission instances by the configured PermissionFactory.
</description> </description>
</attribute> <name>hasPermission</name>
<attribute>
<name>domainObject</name>
<required>true</required> <required>true</required>
<rtexprvalue>true</rtexprvalue> <rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description> <description>
The actual domain object instance for which permissions The actual domain object instance for which permissions
are being evaluated. are being evaluated.
</description> </description>
<name>domainObject</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the
same condition to be reused subsequently in the page without re-evaluation. same condition to be reused subsequently in the page without re-evaluation.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
</tag> </tag>

View File

@ -1,174 +1,178 @@
<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" <taglib xmlns="http://java.sun.com/xml/ns/j2ee"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<taglib> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
<tlib-version>1.1.1</tlib-version> version="2.0">
<jsp-version>1.2</jsp-version> <description>Spring Security Authorization Tag Library</description>
<tlib-version>3.1</tlib-version>
<short-name>security</short-name> <short-name>security</short-name>
<uri>http://www.springframework.org/security/tags</uri> <uri>http://www.springframework.org/security/tags</uri>
<description>
Spring Security Authorization Tag Library
</description>
<tag> <tag>
<name>authorize</name>
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
<description> <description>
A tag which outputs the body of the tag if the configured access expression A tag which outputs the body of the tag if the configured access expression
evaluates to true for the currently authenticated principal. evaluates to true for the currently authenticated principal.
</description> </description>
<name>authorize</name>
<tag-class>org.springframework.security.taglibs.authz.JspAuthorizeTag</tag-class>
<body-content>JSP</body-content>
<attribute> <attribute>
<name>access</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A Spring-EL expression which is supported by the WebSecurityExpressionHandler A Spring-EL expression which is supported by the WebSecurityExpressionHandler
in the application context. The latter will be used to evaluate the expression. in the application context. The latter will be used to evaluate the expression.
</description> </description>
<name>access</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A URL within the application. If the user has access to this URL (as determined by A URL within the application. If the user has access to this URL (as determined by
the AccessDecisionManager), the tag body will be evaluated. If not, it will the AccessDecisionManager), the tag body will be evaluated. If not, it will
be skipped. be skipped.
</description> </description>
<name>url</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>method</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Can optionally be used to narrow down the HTTP method (typically GET or POST) to which the URL Can optionally be used to narrow down the HTTP method (typically GET or POST) to which the URL
applies to. Only has any meaning when used in combination with the "url" attribute. applies to. Only has any meaning when used in combination with the "url" attribute.
</description> </description>
<name>method</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the
same condition to be reused subsequently in the page without re-evaluation. same condition to be reused subsequently in the page without re-evaluation.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifNotGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles which the user must not have A comma separated list of roles which the user must not have
for the body to be output. Deprecated in favour of the access expression. for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifNotGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifAllGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles which the user must all A comma separated list of roles which the user must all
possess for the body to be output. Deprecated in favour of the access expression. possess for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifAllGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>ifAnyGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of roles, one of which the user must A comma separated list of roles, one of which the user must
possess for the body to be output. Deprecated in favour of the access expression. possess for the body to be output. Deprecated in favour of the access expression.
</description> </description>
<name>ifAnyGranted</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
</tag> </tag>
<tag> <tag>
<name>authentication</name>
<tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
<description> <description>
Allows access to the current Authentication object. Allows access to the current Authentication object.
</description> </description>
<name>authentication</name>
<tag-class>org.springframework.security.taglibs.authz.AuthenticationTag</tag-class>
<body-content>empty</body-content>
<attribute> <attribute>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
Property of the Authentication object which should be output. Supports nested Property of the Authentication object which should be output. Supports nested
properties. For example if the principal object is an instance of UserDetails, properties. For example if the principal object is an instance of UserDetails,
the property "principal.username" will return the username. Alternatively, using the property "principal.username" will return the username. Alternatively, using
"name" will call getName method on the Authentication object directly. "name" will call getName method on the Authentication object directly.
</description> </description>
<name>property</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Name of the exported scoped variable which will contain the Name of the exported scoped variable which will contain the
evaluated property of the Authentication object. evaluated property of the Authentication object.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<description>
Set HTML escaping for this tag, as a boolean value.
</description>
<name>htmlEscape</name> <name>htmlEscape</name>
<required>false</required> <required>false</required>
<rtexprvalue>true</rtexprvalue> <rtexprvalue>true</rtexprvalue>
<description>Set HTML escaping for this tag, as a boolean value.</description>
</attribute> </attribute>
<attribute> <attribute>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
Scope for var. Scope for var.
</description> </description>
<name>scope</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
</tag> </tag>
<tag> <tag>
<name>accesscontrollist</name>
<tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
<description> <description>
Allows inclusion of a tag body if the current Authentication Allows inclusion of a tag body if the current Authentication
has one of the specified permissions to the presented has one of the specified permissions to the presented
domain object instance. domain object instance.
</description> </description>
<name>accesscontrollist</name>
<tag-class>org.springframework.security.taglibs.authz.AccessControlListTag</tag-class>
<body-content>JSP</body-content>
<attribute> <attribute>
<name>hasPermission</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<description> <description>
A comma separated list of permissions, which will be converted to A comma separated list of permissions, which will be converted to
Permission instances by the configured PermissionFactory. Permission instances by the configured PermissionFactory.
</description> </description>
</attribute> <name>hasPermission</name>
<attribute>
<name>domainObject</name>
<required>true</required> <required>true</required>
<rtexprvalue>true</rtexprvalue> <rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<description> <description>
The actual domain object instance for which permissions The actual domain object instance for which permissions
are being evaluated. are being evaluated.
</description> </description>
<name>domainObject</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute> </attribute>
<attribute> <attribute>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
<description> <description>
A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the A page scoped variable into which the boolean result of the tag evaluation will be written, allowing the
same condition to be reused subsequently in the page without re-evaluation. same condition to be reused subsequently in the page without re-evaluation.
</description> </description>
<name>var</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
</attribute> </attribute>
</tag> </tag>