Excel Users sheet
This sheet aims at defining the correspondence between the columns in the Master Data Upload file and the Opinum Data Hub users.
Have a look at the general structure for a description of the users sheet.
User mapping row
The mapping row defines the mapping between Master Data Upload file columns and a sources properties. One and only one mapping cell must contain the string ''_opKey'' to indicate that the corresponding column in Master Data Upload file contains the business key of the user, which will then be used to uniquely retrieve the user among all others. The business key definition gives detailed information about this topic.
Is it possible to map one column to multiple user properties and also multiple columns to a single user property
Here are the user system properties that you can specify in a mapping cell.
Warning
The Email property is immutable, you can't modify it afterwards
This definition tells the MDE to map the content of the column ''First Name'' in the Master Data Upload file to the property ''FirstName'' of the user and to map the content of the column ''Last Name'' to property ''LastName''.
User rights
A user needs rights to access Opinum Data Hub entities and to perform operations (defining/reading reports, alerts, ...)
Claims
Claims grant specific rights to a user. A claims is a key/value pair, the key being the granted right and the value being the right itself.
Claim keys
The following claim keys are supported
http://opisense.opinum.com/buildingproperties
http://opisense.opinum.com/sensors
http://opisense.opinum.com/event
http://opisense.opinum.com/storage
http://opisense.opinum.com/tickets
http://opisense.opinum.com/control
http://opisense.opinum.com/schedule
http://opisense.opinum.com/settings
http://opisense.opinum.com/reports
http://opisense.opinum.com/triggers
http://opisense.opinum.com/invoices
Claim values
Any claim key may have one of the following values
NONE
READ
WRITE
ADMIN
Claims definition
A user may have multiple claims. This is done in the Master Data Template by using a [convertion mapping](../excel/template_mappings#Convert operation) that converts an alias into a list of claims.
Tip
If all users must have the same claims, you can omit the ''_opUser.Claims'' definition in the users template sheet and [force](../excel/template_mappings#Force operation) a list of mapping that will be applied to any new user.
{!important] By design, there is no way to delete a claim from a user. You can achieve the same result by setting the claim value to ''NONE''
Roles
Although multiple roles may be granted to a user, Master Data allows to set one role at a time to a user: either ''User'' or ''Manager''.
The definition of the user role may be done explicitly in the users template sheet or through a mapping
Explicit role definition
Mapped role definition
Sites
The list of sites that a user is allowed to access is defined either by a [query](../excel/template_mappings#Query operation) or by a [discrete list](../excel/template_mappings#List operation).
Remember that master_data:excel:template_config dictates the way to manage sites for a user.
Hereunder some sample examples on how to apply a query in the template file and manage access to site. The value from the "Sites" column in the template file will be:
- Provide access to a single site > "Id=18984"
- Provide access to all sites of the account > "Id>1"
- Conditional access to sites > "Id=19127 OR Id=49040"
Sources
The list of sources that a user is allowed to access is defined either by a [query](../excel/template_mappings#Query operation) or by a [discrete list](../excel/template_mappings#List operation).
Remember that master_data:excel:template_config dictates the way to manage sources for a user.