Document lexicon.default.userconfig and lexicon.default.userconfig.enforced in config.sample.php

Open Beginner friendly
#67,538 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
php
Domain
documentation

Research direction

Open config/config.sample.php and follow its existing format for documenting configuration settings. Read the linked UserConfig.php code to confirm how the two keys work. Add examples and explain that they apply only to keys declared in an app's config lexicon, and that enforcement makes the admin default override user-stored values.

Written by the indexing model from the issue text.

Description

enhancement feature: settings good first issue
Description

Admins can override the default of any user config key declared in an app's config lexicon with the system settings lexicon.default.userconfig and enforce it with lexicon.default.userconfig.enforced:

https://github.com/nextcloud/server/blob/3a68340a6c806a18cdd0d9667a3b9ec5f096b135/lib/private/Config/UserConfig.php#L2031-L2062

Neither key is documented in config/config.sample.php, so admins can only find them by reading the code (see e.g. #60220).

Found by code reading.

Proposal

Add both keys to config/config.sample.php with an example, e.g.

'lexicon.default.userconfig' => [
	'<appId>' => [
		'<configKey>' => 'value',
	],
],
'lexicon.default.userconfig.enforced' => [
	'<appId>' => [
		'<configKey>' => true,
	],
],

and explain that they only apply to keys declared in an app's config lexicon, and that "enforced" makes the admin default win over values stored by users.

Dominant language
PHP
Stars
37.6k
Forks
5.4k
Avg merge
1d 20h
Merged PRs (30d)
605

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextcloud/server

All issues in nextcloud/server

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.