1 Reply Latest reply on Jul 28, 2010 8:27 PM by vimalm

    Drools Rule Not working with Underscore Character in the Role Name

    vimalm

      I am using SEAM 2.1.1 GA and have the following rule defined in my security.drl file:


      rule PERM_VIEW_SYS_OVERSITE
      when 
        c: PermissionCheck( target == "systemOversite", action=="view" )
        Role(name in ("Support_I", "Support_II" ))
      then
        c.grant();
      end
      



      My problem is that a permission check for above never returns true


      System.out.println(  " -----------> Check Role " + Identity.instance().hasRole("Support_I"));
      



      returns


      -----------> Check Role true
      



      However


      System.out.println(  "-----------> Check Permission " + Identity.instance().hasPermission("systemOversite", "view")   );
      



      returns


       -----------> Check false
      



      Could somebody help me out with what is Wrong? I suspect that because the role name have underscore characters in it, it is breaking. Other rules which do not have roles with underscore character work as expected. Do I need to use some escape tags?


      Thanks