3 Replies Latest reply on Mar 4, 2009 11:40 PM by jk;l jkl;

    Grant roles based on other roles

    jk;l jkl; Expert

      Why do the following rules not successfully grant the new-role role to any user that currently has the old-role role?



      rule NewRoleForOldRole
      when
        Role(name == "old-rule")
        identity : Identity(loggedIn == true)
      then
        identity.addRole("new-role");
      end;




      When would the above action (i.e. identity.addRole()) get executed, or do I need to do something in the code to execute the actions of that role?