[jboss-cvs] jboss-seam/doc/reference/en/modules ...
Shane Bryzak
sbryzak at redhat.com
Fri Mar 9 07:17:44 EST 2007
User: sbryzak2
Date: 07/03/09 07:17:44
Modified: doc/reference/en/modules security.xml
Log:
describe wildcard permissions
Revision Changes Path
1.51 +25 -0 jboss-seam/doc/reference/en/modules/security.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: security.xml
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/doc/reference/en/modules/security.xml,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -b -r1.50 -r1.51
--- security.xml 9 Mar 2007 11:06:29 -0000 1.50
+++ security.xml 9 Mar 2007 12:17:44 -0000 1.51
@@ -959,7 +959,32 @@
intended for.
</para>
+ <sect3>
+ <title>Wildcard permission checks</title>
+
+ <para>
+ It is possible to implement a wildcard permission check (which allows all actions for a given permission
+ name), by omitting the <literal>action</literal> constraint for the <literal>PermissionCheck</literal> in
+ your rule, like this:
+ </para>
+
+ <programlisting><![CDATA[rule CanDoAnythingToCustomersIfYouAreAnAdmin
+when
+ c: PermissionCheck(name == "customer")
+ Role(name == "admin")
+then
+ c.grant();
+end;
+ ]]></programlisting>
+
+ <para>
+ This rule allows users with the <literal>admin</literal> role to perform <emphasis>any</emphasis> action for
+ any <literal>customer</literal> permission check.
+ </para>
+ </sect3>
+
</sect2>
+
</sect1>
<sect1>
More information about the jboss-cvs-commits
mailing list