System Variables

Options
Can you store a list of values in one system variable.

As an example, I need to store a list of roles that has access to an end point and want to manage this centrally through system variables.

What I am looking for is something like this.

var (allowedroles) = admin,sales,finance

When an end point is executed is to step through the allowedroles variable to see if the role is allowed to execute 

or does it only allow for single values?

Comments

  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
    Environment variables only support text strings - but you can still manipulate those on the fly with filters. You could store it as json and then use the json_decode filter. Or you could store it as comma separated values and then use the split filter.