Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to provide conditions in the app descriptor based on the user properties?

Bharath Kumar February 24, 2020

I have stored data under the user properties of a particular user using the following REST API, 

/rest/api/3/user/properties/{propertyKey}?accountId=5b10ac8d82e05b22cc7d4ef5

Now, I need to write a condition is my app descriptor which decides whether to show that module to that user or not based on the data present in the user properties of that particular user. 

But I'm not able to find a way to access the user properties inside the conditions or params of the App Descriptor. 

Kindly, help me with this! Thanks in advance!

1 answer

0 votes
Dipesh Chouksey April 25, 2020

Hi  Bharat,

You cant do condition for user property(only with user permission work with descriptor file) with the app descriptor. You need to handle this condition in your controller.

 

Sample code for condition in constroller:

if (licenseStatus.equals("active")) {
      model.setViewName("index");
} else {
     model.setViewName("license");
}

Suggest an answer

Log in or Sign up to answer