1 Reply Latest reply on Sep 24, 2009 8:47 PM by nsaraf

    Security.drl syntax - assign multiple roles to a permission

    nsaraf
      Hello,

      In security.drl, when i match one role to one permission, the syntax is as below:

      rule "My Rule"
      when
      $c: PermissionCheck(name == "myrule")
      Role (name == "Admin")
      then    
         $c.grant();
      end;

      However, if i want to assign multiple roles to that permission, I am unable to get it to work.

      rule "My Rule"
      when
      $c: PermissionCheck(name == "myrule")
      Role (name == "Admin")
      Role (name == "User")
      then    
         $c.grant();
      end;

      Would appreciate any pointers on getting this syntax right.

      Thanks,
      Neeti