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

未关闭 适合新手
#67,538 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
88/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
php
领域
documentation

调研方向

打开 config/config.sample.php,按照现有格式编写配置设置的说明。阅读链接的 UserConfig.php 代码,确认两个键的工作方式。添加示例,并说明它们仅适用于应用配置词汇表中声明的键,且强制执行会使管理员默认值覆盖用户存储的值。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
PHP
星标
37.6k
派生
5.4k
平均合并
1 天 20 小时
30 天内合并 PR
605

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

nextcloud/server 的其他 Issue

查看 nextcloud/server 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。