Skip to content

feat(config): map missing config keys to env vars#516

Open
DeepDiver1975 wants to merge 1 commit into
masterfrom
feat/missing-config-env-vars
Open

feat(config): map missing config keys to env vars#516
DeepDiver1975 wants to merge 1 commit into
masterfrom
feat/missing-config-env-vars

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Summary

Adds environment-variable mappings for three ownCloud config.php keys that were documented/available as config keys but had no corresponding env var in the image config template.

Env var config.php key Issue
OWNCLOUD_USER_BACKENDS user_backends #490
OWNCLOUD_CUSTOMGROUPS_DISALLOW_ADMIN_ACCESS_ALL customgroups.disallow-admin-access-all #491
OWNCLOUD_CUSTOMGROUPS_DISALLOWED_GROUPS customgroups.disallowed-groups #491
OWNCLOUD_LOGIN_POLICY_GROUP_FORBID_MAP loginPolicy.groupLoginPolicy.forbidMap #493

Details

  • user_backends and loginPolicy.groupLoginPolicy.forbidMap are nested/named arrays that the flat getenv → string/explode() idioms cannot express, so they use the JSON-encoded pattern already established for OWNCLOUD_LOG_CONDITIONS (json_decode(...) guarded by is_array). Invalid JSON is silently ignored, leaving the key unset.
  • customgroups.* are two simple keys: a boolean and a comma-separated list — mapped with the existing === 'true' and explode(',', ...) idioms. These are the only two customgroups. config keys (verified against the owncloud/customgroups app source).
  • Mappings are added to v24.04 only, matching the established convention that v20.04/v22.04 templates are frozen and only 22.04/24.04 are built by CI.
  • ENVIRONMENT.md gains alphabetically-placed entries for each var; CHANGELOG.md gets a dated section.

Config-key shapes were validated against ownCloud org repos (owncloud/core, owncloud/docs-server, owncloud/customgroups, user_external).

Verification

  • php -l passes on all three templates.
  • Behavioral check via php -r dumping $CONFIG: each key appears with the correct shape when its var is set, is absent when unset, and invalid JSON is safely ignored.

Closes #490
Closes #491
Closes #493

🤖 Generated with Claude Code

Add environment variables for three config keys that had no
corresponding env-var mapping in the image config template:

- OWNCLOUD_USER_BACKENDS -> user_backends (closes #490)
- OWNCLOUD_CUSTOMGROUPS_DISALLOW_ADMIN_ACCESS_ALL and
  OWNCLOUD_CUSTOMGROUPS_DISALLOWED_GROUPS -> customgroups.* (closes #491)
- OWNCLOUD_LOGIN_POLICY_GROUP_FORBID_MAP ->
  loginPolicy.groupLoginPolicy.forbidMap (closes #493)

The user_backends and forbidMap keys are nested/named arrays that the
flat env-var idioms cannot express, so they use the JSON-encoded pattern
already established for OWNCLOUD_LOG_CONDITIONS. Mappings are added to
v24.04 only, matching the convention that v20.04/v22.04 are frozen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing envvar for loginPolicy.groupLoginPolicy.forbidMap Missing envvars for customgroups.xxx configurations Missing envvar for 'user_backends'

2 participants