Special Value Types deprecated
Introduction
Even though the configuration option of the App Suite Middleware are extensive it still relies on simple string values. This can be limiting especially in case of UI settings. Historically UI settings are mostly configured via the as-config.yml which yml structure allows to use various value types. But sometimes you need to configure a UI setting on a different layer (e.g. user).
For this purpose this guide provides some examples and guidelines on how to configure special value types like arrays and json objects.
How-To
First please note that it's impossible to configure other value types directly and that those types are only available through the jslob api. This means that all values need to be configured as strings and are then interpreted as other structures for the jslob api.
And as always be aware that you need to configure a fallback value first in the settings folder before you can change any setting via the provisioning api.
With that out of the way lets go through all available value types.
BOOLEAN & NUMBER
For booleans and numbers you don't have to do anything special. Those properties will be automatically detected:
changeuser -A oxadmin -P secret -c 1 -i 4 --config/io.ox/core//features/dedicatedLogoutButton=true
changeuser -A oxadmin -P secret -c 1 -i 4 --config/io.ox/core//apps/quickLaunchCount=5
ARRAYS
Lets say you want to configure the available currencies for tasks to ["CAD","CHF","EUR"]. Here you only have to escape all double quotes with a backlash:
changeuser -A oxadmin -P secret -c 1 -i 4 --config/io.ox/tasks//currencies=[\"CAD\",\"CHF\",\"EUR\"]
JSON
It is also possible to provide complete subtrees per configuration. For example if you want to configure the io.ox/core//apps
segment with a single property you can do that by again escaping the double quotes:
changeuser -A oxadmin -P secret -c 1 -i 4 --config/io.ox/core//apps={\"quickLaunchCount\"=5}
Please be aware that in this case you also need to configure a default for io.ox/core//apps
. Configuring a default for io.ox/core//apps/quickLaunchCount
does not help. And using both at the same time can lead to unexpected behavior.