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

    Security.drl syntax - assign multiple roles to a permission

    Nitin Sara Newbie
      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