User attributes give Omni the ability to map user-specific variables to operations in the application - querying, dashboarding, or general permissions.
Creating User Attributes
To define a new user attribute, click the 'New Attribute' button on the Attributes admin page. Each user attribute has the following settings:
- Name: The name of the user attribute, how it will be displayed in the UI
- Reference: How the attribute will be referenced in code, such as in the model
- Type: Used to check that valid values are assigned to users. String and Number data types are allowed.
- Multiple values: Specifies whether multiple values can be assigned to a user for this attribute
- Description: Explanation of the attribute or how it will be used
- Default value: Optionally, set a default value that all users will inherit if a value is not directly assigned to them
Assigning values to individual users
After defining a user attribute, assign a value for each user:
- Select the Users tab
- Select 'Edit Value' for the user you'd like to set
- Enter the new value
- The source field will show whether the user's value was set by inheriting the attribute default value (Default setting), or if the value was set specifically for the user (User setting)
Where can user attributes be used?
Access filters allow you to restrict the rows of data a user can access. Access filters apply the values assigned on a user attribute to the where clause of every SQL query a user runs.