ilog.rules.teamserver.model

Interface IlrIsUserInRoleCallback

  • All Superinterfaces:
    IlrSessionCallback
    All Known Implementing Classes:
    IlrDefaultIsUserInRoleCallback


    public interface IlrIsUserInRoleCallback
    extends IlrSessionCallback
    A callback with a single method to determine the roles of the current user. By default, Decision Center uses the IlrDefaultIsUserInRoleCallback class, which will get the roles given by the J2EE authentication provider.

    You might want to provide your own callback in order to dynamically determine the list of roles of the user. In this case, here is the process to follow:

    • Write a class, for example com.mycompany.MyIsUserInRoleCallback, which implements IlrIsUserInRoleCallback
    • Write a preferences.properties file, with the following line:
      teamserver.isUserInRole.class = com.mycompany.MyIsUserInRoleCallback
    • Put com.mycompany.MyIsUserInRoleCallback in a jar file, for example mycompany.jar.
    • Put preferences.properties in the root level of the jar file
    • Repackage the RTS ear using the repackage-ear ant task, with mycompany.jar as an additional jar.

    Note: You cannot specify your implementation using the set-config-param ant task, which stores parameters in the database. This is because, as opposed to the methods of IlrSessionController, the isUserInRole method needs to be called at login time, at a time when the database may not exist at all.

    Since:
    JRules 7.0
    • Method Detail

      • isUserInRole

        boolean isUserInRole(java.lang.String role)
        Indicates whether the user has the given role.
        Parameters:
        role - The user role.
        Returns:
        true if the current user has the given role.

© Copyright IBM Corp. 1987, 2017