Creating User Attributes
- Navigate to the Admin section
- Go to the Attributes section
- Click to create a new attribute
- Configure the attribute:
- Set a name
- Choose the type
- Optionally set a default value
- Optionally set a display name
Setting User Attribute Values
User attributes can be set on a per-user basis:- Navigate to the user’s page
- Locate the attributes section
- Set the desired attribute value (e.g., setting city to “Los Angeles”)
Implementing Row-Level Access Policy
To filter data based on user attributes, implement an access policy in your views:Security Context
The user attributes are available in the security context object:Effect on Queries
When the access policy is implemented, queries will automatically be filtered based on the user’s attributes. This ensures users can only access data that matches their attribute values.The path to access user attributes (securityContext.cubeCloud.userAttributes) will be simplified in future updates to allow direct access through user attributes.