Role Based Product Access
This page explains how to manage user access to products and data within the HCL CDP by assigning roles in a multi-tenant environment. Each role determines which products and dashboard metrics a user can see, ensuring secure and personalized experiences.
The role based product access is designed to control visibility of features and data
across tenants based on user roles. It ensures users see only the products assigned to
their roles, access can vary by tenant (organization), and dashboards and campaign views
reflect only the permitted data.
Note: This Role Based Product
Access will work only in the Standalone HCL CDP environment.
Execute Role Based Product Access Table Scripts
To map user role access, follow the steps below:
- Create the following tables for an environment using the create queries:
PBARoleProductMapping:CREATE TABLE PBARoleProductMapping ( TenantID INT NOT NULL, RoleID INT NOT NULL , ProductName TEXT NOT NULL, PRIMARY KEY (TenantID, RoleId) );PBATenantUserRoles:CREATE TABLE PBATenantUserRoles ( TenantID INT NOT NULL, RoleID INT NOT NULL, RoleName VARCHAR(255) NOT NULL, PRIMARY KEY (TenantID, RoleID) );PBARoleUserMapping:CREATE TABLE PBARoleUserMapping ( TenantID INT NOT NULL, RoleID INT NOT NULL, UserID INT NOT NULL, PRIMARY KEY (UserId, RoleID ) );
- Define the role in the
PBATenantUserRolestable for the tenant.insert into PBATenantUserRoles (RoleID, RoleName, TenantID) values (1,"Admin", <TenantID>);Note: Replace the <TenantID> with the corresponding value. - Define product labels in the
PBARoleProductMappingtable for RoleID and TenantID.insert into PBARoleProductMapping (RoleID, ProductName, TenantID) values (1,'["HOME LOAN","Credit Card","Credit Upgrade Offer","Credit card"]', <TenantID>); - Assign the role of tenant to a particular user in the
PBARoleUserMappingtable.insert into PBARoleUserMapping (RoleID, UserID, TenantID) values (1,3724, <TenantID>);