Extending Tenant Entity for storing list of strings and giving user access based on those string

Hi Everyone,

We have a scenario of multi tenants where each tenant is given a set of strings.
I need to implement access control on user based on group of strings assigned to them.

For example:

Tenant 1 is assigned with a group of strings : {key1, key2,key3…key20}

Within tenant we have multiple groups and each group will be assigned subset of the tenant keys
group 1: key1,key2,key 3
group2: key 4,key5,key6,key7,key8
group3: key9,key10,key11,key12,key13,key14,key15,key16,key17
group 4: key 18,key19
group 5:key 20

admin of the tenant would be assigning the user to a group.

Could someone help me how this can be achieved using multi tenancy add on or using cuba security components

Thanks in advance for the support


Look at Session Attributes that can be assigned to an access group. These attributes become available via UserSession.getAttribute(), so you can use them in the application code to apply some restrictions to users.