diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-07-30 18:19:55 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-08-01 09:17:56 -0700 |
commit | 0def7fa71c18f20dcdcd38f1f09391c369f52930 (patch) | |
tree | 605ef0c9a185d98daa155bb235f40d9f4739dcd7 /apps/files/lib | |
parent | 5812a3422f8b6be7afbeaaa140d7d555feb3206f (diff) | |
download | nextcloud-server-0def7fa71c18f20dcdcd38f1f09391c369f52930.tar.gz nextcloud-server-0def7fa71c18f20dcdcd38f1f09391c369f52930.zip |
feat(files): Allow toggling folder tree
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Service/UserConfig.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/lib/Service/UserConfig.php b/apps/files/lib/Service/UserConfig.php index b9b9248e172..c2339965793 100644 --- a/apps/files/lib/Service/UserConfig.php +++ b/apps/files/lib/Service/UserConfig.php @@ -42,6 +42,12 @@ class UserConfig { 'default' => false, 'allowed' => [true, false], ], + [ + // Whether to show the folder tree + 'key' => 'folder_tree', + 'default' => true, + 'allowed' => [true, false], + ], ]; protected IConfig $config; @@ -108,7 +114,7 @@ class UserConfig { if (!in_array($key, $this->getAllowedConfigKeys())) { throw new \InvalidArgumentException('Unknown config key'); } - + if (!in_array($value, $this->getAllowedConfigValues($key))) { throw new \InvalidArgumentException('Invalid config value'); } |