Closed josecelano closed 2 months ago
Notice the [demo]
section in the TOML file follows the same convention as the [registration]
:
# ...
[demo]
# ...
[registration]
# ...
If the section is present, then it's enabled, meaning the demo
mode is enabled when the configuration contains the [demo]
section. In previous versions of the configuration for other sections we were using an explicit field enabled
like this:
# ...
[demo]
enabled = true
# ...
[registration]
enabled = true
# ...
We decided to change it to not force the user to add that section when they don't need it. The final config file is shorter and clearer. However, I've just realized that it's not possible to enable the section by just using env vars. The configuration is loaded from the TOML file and merged with env vars. Env vars only allow overriding final values. It's impossible to add a new section when it's not present in the initial configuration. That could be a problem in the containerized environment where you maybe want to use only env vars. Anyway, since we allow injecting the whole TOML file as an env var, that env var can be used to define these empty sections to enable them.
cc @da2ce7
Relates to: https://github.com/torrust/torrust-index-gui/issues/617
Context
We need to include legal information in the web app. The info will be provided by the API. Ideally, we should build a proper CMS, but since we don't want to postpone the version 3.0.0 release, we will use config values to allow users to easily customize those texts.
Temporary Solution
Add new config values for static content about terms (Usage Policies and Content Restrictions)
NOTES
We did something similar this for the casbin configuration https://github.com/torrust/torrust-index/issues/702
However, that is app configuration not content.
cc @da2ce7 @cgbosse @mario-nt