RAD function: mandant

The Service Manager mandanten feature protects records of multiple clients by logically separating a shared database. Clients see only the data they are allowed to share. The mandant RAD function allows an application to create a subset of the current mandanten values. For example, if a new record is being opened and the client (customer) for the record is known, then a subset of the mandanten values can be created to show only the assignments that are valid for that client.

Function

mandant

Format

mandant(n,string)

Where n equals 0, 1, 2, or 3.

Parameters

  • 0 represents a request for a subset of the current mandanten values.
  • 1 represents a request to restore the original mandanten values.
  • 2 links the current user to the set of records in the scsecuritygroup file that matches the array of security IDs.
  • 3 sets the security roles for the tables defined in the scFolderAccess file.

The value of the string variable is the mandanten value.

Example usage

In Service Manager the out-of-box system has three scsecurity group records: "Company A", "Company B" and "Company C". To establish the mandanten security for the user, the RAD could call the following:

mandant(2, {"Company A"}) or mandant(2,{"Company A", "Company B"})

Security roles are implemented in the scFolderAccess table. The RAD calls the mandant function with 3 to set the security roles for the given tables. The following example sets the security role of ADMIN for two tables, as defined in the scFolderAccess file.

mandant(3, "ADMIN",{"cm3", "device"})

Note This fails if the string value does not match the values currently established.