Map users to roles

You can map users to roles in two ways.

  • Custom database query

  • Fixed value

Custom Database Query

  1. In Admin Console, on the Documents Tree, click Authentication.
  2. Select HTTP Request and External database.
    Note Use this option to configure user roles from a custom query to an external database.
  3. In Admin Console, right-click Roles and click New user role. Name the new role and click OK.
  4. On the External DB mapping tab, Source field, enter the database connection string. In the area below the Source field, enter the SQL query.
    Note Within the SQL statement, each URL property should be placed within < and > characters for numeric values, and within '< and >' for strings.

    Any parameters from HTTP request string can be used within a query.

    Example

    Select *from Roles_Mapping

    where Staff_ID='<UserID>' and Group_ID = 'Role'

    Where:

    Staff_ID and Group_ID are fields of Roles_Mapping table.

    UserID is a parameter from an HTTP request.

    'Role' is an identifier/name of a particular role.

    If the query returns at least one value, the user will get the rights of the selected role.

Fixed Values

  1. In Admin Console, on the Documents Tree, click Authentication.
  2. Select HTTP Request and Fixed values.
    Note In this case, the parameters sent via HTTP request are compared to a fixed value.
  3. In the Admin Console, right-click Roles, and click New user role. Name the new role and click OK.
  4. In the Fixed values mapping tab, define the property that needs to be compared.
    1. Select Click here to add new data.
    2. Add the property to compare, such as UserID.
      Note This parameter is passed in the URL.
    3. For the Operator, select Equal from the list, and add the fixed value.