jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "david robin" <j...@club-internet.fr>
Subject Re: Simple security tags proposal
Date Mon, 15 Apr 2002 15:13:24 GMT
Sorry,
this time it should be good.
I used the EVAL_BODY_TAG instead of EVAL_BODY_INCLUDE for backward
compatibility with jsp1.1, and I add the necessary  infos in request.jsp and
request.xml.

Here is the diff:
----------------------------------------------------------------------------
----------
? src/org/apache/taglibs/request/AllowTag.java

? src/org/apache/taglibs/request/DenyTag.java

? src/org/apache/taglibs/request/SecurityTag.java

cvs server: Diffing .

cvs server: Diffing conf

cvs server: Diffing doc

cvs server: Diffing doc/conf

cvs server: Diffing doc/web

cvs server: Diffing examples

cvs server: Diffing examples/conf

cvs server: Diffing examples/web

Index: examples/web/request.jsp

===================================================================

RCS file: /home/cvspublic/jakarta-taglibs/request/examples/web/request.jsp,v

retrieving revision 1.5

diff -u -r1.5 request.jsp

--- examples/web/request.jsp 13 Jul 2001 00:49:36 -0000 1.5

+++ examples/web/request.jsp 15 Apr 2002 15:02:51 -0000

@@ -178,5 +178,13 @@

<req:log>

Test of logging to your servlet context log by the request taglib.

</req:log>

+<br><br>

+<req:allow roles="boss">content accessible only for a user in the boss
role<br></req:allow>

+<req:allow roles="boss,worker">content accessible for a user in the boss
role or in the worker role<br></req:allow>

+<req:allow roles="boss:worker" delim=":">content accessible for a user in
the boss role or in the worker role(test delim)<br></req:allow>

+

+<req:deny roles="boss">content not accessible only for a user in the boss
role<br></req:deny>

+<req:deny roles="boss,worker">content not accessible for a user in the boss
role or in the worker role<br></req:deny>

+<req:deny roles="boss:worker" delim=":">content not accessible for a user
in the boss role or in the worker role(test delim)<br></req:deny>

</body>

</html>

cvs server: Diffing src

cvs server: Diffing src/org

cvs server: Diffing src/org/apache

cvs server: Diffing src/org/apache/taglibs

cvs server: Diffing src/org/apache/taglibs/request

cvs server: Diffing xml

Index: xml/request.xml

===================================================================

RCS file: /home/cvspublic/jakarta-taglibs/request/xml/request.xml,v

retrieving revision 1.9

diff -u -r1.9 request.xml

--- xml/request.xml 15 Apr 2002 00:18:42 -0000 1.9

+++ xml/request.xml 15 Apr 2002 15:02:55 -0000

@@ -57,6 +57,102 @@

</requirements-info>

<tagtoc name="Request Tags">

+ <tag>

+ <name>allow</name>

+ <tag-class>org.apache.taglibs.request.AllowTag</tag-class>

+ <body-content>JSP</body-content>

+ <display-name>allow</display-name>

+

+ <description>

+ Allow access to the content of the tag for a user in one of the specified
roles.

+ </description>

+

+ <summary>Allow access to the content of the tag for a user in one of the
specified roles.</summary>

+ <availability>1.0</availability>

+ <restrictions>None</restrictions>

+ <attribute>

+ <name>roles</name>

+ <required>yes</required>

+ <rtexprvalue>no</rtexprvalue>

+ <description>

+ List of roles allowed to access the tag content.

+ </description>

+ <availability>1.0</availability>

+ </attribute>

+

+ <attribute>

+ <name>delim</name>

+ <required>no</required>

+ <rtexprvalue>no</rtexprvalue>

+ <description>

+ Replace the default roles separator (comma)

+ </description>

+ <availability>1.0</availability>

+ </attribute>

+ <example>

+ <usage>

+ <comment>

+ Simple example using two roles: boss and worker.

+ </comment>

+ <code>

+<![CDATA[

+<req:allow roles="boss">content accessible only for a user in the boss
role</req:allow>

+<req:allow roles="boss,worker">content accessible for a user in the boss
role or in the worker role</req:allow>

+<req:allow roles="boss:worker" delim=":">content accessible for a user in
the boss role or in the worker role(test delim)</req:allow>

+]]>

+ </code>

+ </usage>

+ </example>

+

+ </tag>

+ <tag>

+ <name>deny</name>

+ <tag-class>org.apache.taglibs.request.DenyTag</tag-class>

+ <body-content>JSP</body-content>

+ <display-name>deny</display-name>

+

+ <description>

+ Deny access to the content of the tag for a user in one of the specified
roles.

+ </description>

+

+ <summary>Deny access to the content of the tag for a user in one of the
specified roles.</summary>

+ <availability>1.0</availability>

+ <restrictions>None</restrictions>

+ <attribute>

+ <name>roles</name>

+ <required>yes</required>

+ <rtexprvalue>no</rtexprvalue>

+ <description>

+ List of roles not allowed to access the tag content.

+ </description>

+ <availability>1.0</availability>

+ </attribute>

+

+ <attribute>

+ <name>delim</name>

+ <required>no</required>

+ <rtexprvalue>no</rtexprvalue>

+ <description>

+ Replace the default roles separator (comma)

+ </description>

+ <availability>1.0</availability>

+ </attribute>

+ <example>

+ <usage>

+ <comment>

+ Simple example using two roles: boss and worker.

+ </comment>

+ <code>

+<![CDATA[

+<req:deny roles="boss">content not accessible only for a user in the boss
role</req:deny>

+<req:deny roles="boss,worker">content not accessible for a user in the boss
role or in the worker role</req:deny>

+<req:deny roles="boss:worker" delim=":">content not accessible for a user
in the boss role or in the worker role(test delim)</req:deny>

+]]>

+ </code>

+ </usage>

+ </example>

+

+ </tag>

<tag>

<name>log</name>

<tag-class>org.apache.taglibs.request.LogTag</tag-class>

--------------------------------------------------------

I hope it helps,
David

Mime
View raw message