aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Config
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2025-05-07 14:06:56 -0100
committerMaxence Lange <maxence@artificial-owl.com>2025-05-07 14:08:10 -0100
commit62a82ae702d04aa2a68c9bffc2ce9b92965df8cd (patch)
tree77ee307f8a971f2cc621d73d54a9e184945bdc37 /lib/private/Config
parent0dc971189badaf050fa5048e391c70fb15171b6f (diff)
downloadnextcloud-server-fix/noid/lexicon-update-lazy-status.tar.gz
nextcloud-server-fix/noid/lexicon-update-lazy-status.zip
feat(appconfig+userconfig): lexicon update lazy statusfix/noid/lexicon-update-lazy-status
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/private/Config')
-rw-r--r--lib/private/Config/UserConfig.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Config/UserConfig.php b/lib/private/Config/UserConfig.php
index 77a86a5e1c7..22588d5394d 100644
--- a/lib/private/Config/UserConfig.php
+++ b/lib/private/Config/UserConfig.php
@@ -1865,6 +1865,19 @@ class UserConfig implements IUserConfig {
$this->logger->notice('User config key ' . $app . '/' . $key . ' is set as deprecated.');
}
+ // There should be no downside to load all config values if search for
+ // a lazy config value while fast value are still not loaded.
+ if ($lazy && !($this->fastLoaded[$userId] ?? false)) {
+ $this->loadConfigAll($userId);
+ }
+
+ // while the Lexicon indicate that the config value is expected Lazy, we could
+ // have a previous entry still in fast cache. Updating Laziness for all users.
+ if ($lazy && isset($this->fastCache[$userId][$app][$key])) {
+ $this->updateGlobalLazy($app, $key, true);
+ }
+
+ // TODO: remove this feature before 32 if https://github.com/nextcloud/server/issues/51804 is implemented
$enforcedValue = $this->config->getSystemValue('lexicon.default.userconfig.enforced', [])[$app][$key] ?? false;
if (!$enforcedValue && $this->hasKey($userId, $app, $key, $lazy)) {
// if key exists there should be no need to extract default