<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2>The use of regular expressions in your pattern match would 
help.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New" color=#0000ff size=2>rule 
  "GeneralisedRestrictAccessClient"</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New" color=#0000ff size=2>when</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New" color=#0000ff size=2>&nbsp;&nbsp;&nbsp; check : 
  PermissionCheck( name matches "/*Edit.xhtml", action == "render" 
  )</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New" color=#0000ff size=2>then</FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New">&nbsp;&nbsp;&nbsp; <FONT color=#0000ff 
  size=2>check.grant();</FONT></FONT></SPAN></DIV>
  <DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT 
  face="Courier New" color=#0000ff size=2>end</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2>You'd best check the RegEx syntax 
though!</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2>Cheers,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2>Mike</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=920433909-08112007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><FONT face=Arial color=#0000ff 
size=2></FONT><BR>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rules-users-bounces@lists.jboss.org 
  [mailto:rules-users-bounces@lists.jboss.org] <B>On Behalf Of </B>Mohamed 
  Mhissen<BR><B>Sent:</B> 08 November 2007 09:26<BR><B>To:</B> 
  rules-users@lists.jboss.org<BR><B>Subject:</B> [rules-users] generalize a rule 
  in "security.drl" file<BR></FONT><BR></DIV>
  <DIV></DIV><SPAN class=postbody>I use restrictions to control access to my 
  pages. <BR><BR>In my <SPAN style="FONT-WEIGHT: bold">security.drl</SPAN> file, 
  I have : <BR><BR></SPAN>
  <TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
    <TBODY>
    <TR>
      <TD><SPAN class=genmed><B>Code:</B></SPAN></TD></TR>
    <TR>
      <TD class=code><PRE>rule RestrictAccessClientEdit<BR>        when<BR>                check: PermissionCheck(name == "/ClientEdit.xhtml", action == "render")<BR>                  Role(name == "admin")<BR>        then<BR>                check.grant
();<BR><BR>rule RestrictAccessOrderEdit<BR>        when<BR>                check: PermissionCheck(name == "/OrderEdit.xhtml", action == "render")<BR>                  Role(name == "admin")<BR>        then<BR>                check.grant();<BR>end;        
</PRE></TD></TR></TBODY></TABLE><SPAN class=postbody><BR><BR>I want to 
  generalize this restriction so to apply it to all pages publishing: <SPAN 
  style="FONT-WEIGHT: bold">*Edit.xhtml</SPAN> <BR><BR>I tried like that : 
  </SPAN><SPAN class=postbody><BR><BR></SPAN>
  <DIV style="MARGIN-LEFT: 40px"><SPAN class=genmed><B>Code:</B></SPAN></DIV>
  <DIV style="MARGIN-LEFT: 80px">check: PermissionCheck(name == "/*Edit.xhtml", 
  action == "render")<BR></DIV><SPAN class=postbody><BR>Any help would be very 
  welcome, <BR>Thanks,<BR><BR></SPAN>-- <BR>Mohamed Mhissen<BR><A 
  href="mailto:mohamed.mhissen@bsaconseil.com">mohamed.mhissen@bsaconseil.com</A><BR>+33.6.65.04.28.79 
</BLOCKQUOTE></BODY></HTML>