Hi Mohamed!

Mohamed Mhissen wrote:
I use restrictions to control access to my pages.

[...]

rule RestrictAccessClientEdit
        when
                check: PermissionCheck(name == "/ClientEdit.xhtml", action == 
"render")
                Role(name == "admin")
        then
                check.grant
();

[...] I want to generalize this restriction so to apply it to all pages publishing: *Edit.xhtml

I tried like that :

*Code:*
check: PermissionCheck(name == "/*Edit.xhtml", action == "render")

You can do this with the "matches" operator (cf. Drools manual section 6.5.2.1.1.3.1., "Matches Operator"), e.g., like this:

check: PermissionCheck(name matches "^\/.*Edit\.xhtml$", action == "render")

HTH,
Christian
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to