Home General

TeamSite Targeting with List of User Roles Not Working

We are trying to show/hide components based on User Role(s). Below are the steps we have taken to apply the Rules on a component.

 

1. We have introduced 'Role' attribute in our CustomUserProfile class.

 Image preview

2. We introduced role.xml as verbalization condition.

Image preview

3. We introduced role.provider with custom Provider class.

 Image preview

4. The provide class populate the conditional dropdown after making a external REST service. 

 Image preview

5. Using above Condition we have created Action & Rule. Applying the Rule from the Preview Component Screen.

Image preview

6. Trying to populate Role attribute in Component External Class.

Image preview


The RulesEngine evaluating the above Conditions as FALSE as it always tries to compare  User Profile Role List with Condition Value using Equals Operator.

 But, our assumption/requirement is the RulesEngine should compare User Profile Role List with Condition Value using Contains Operator. 


Comments

Sign In or Register to comment.