Problem/Motivation

In #3272994: eca_config: Provide actions for reading and writing configuration values, actions were added which read values from the Config API. However, the $settings variable in settings.local.php is often used by site builders for instance-specific configuration, which is not accessible through Config API.

Proposed resolution

Add an action to read from the Settings API and store the result in token, similar to the Config: Read action.
It can potentially be grouped under ECA Misc submodule.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

starlight-sparkle created an issue.

jurgenhaas’s picture

This is certainly possible, but we've not implemented it yet for a reason. Having access to the settings can potentially be a security risk as ECA would then also have access to the hash which would allow for dangerous things if that got exposed.

starlight-sparkle’s picture

If access is a concern, what if we require the respective settings keys to be added to a whitelist first?
Like for instance, the action will only read $settings['some_custom_setting'] if the value $settings['eca_misc']['settings_read_whitelist'] = ['some_custom_setting']; is set.