From 37f9bc11578c0bc702a945716543d075e3730beb Mon Sep 17 00:00:00 2001 From: Jos Poortvliet Date: Fri, 6 Mar 2026 17:15:21 +0100 Subject: [PATCH 1/2] feat: Add 'user_migration' to relevant quick presets closes https://github.com/nextcloud/server/issues/57406 Signed-off-by: Jos Poortvliet --- lib/private/Config/PresetManager.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/private/Config/PresetManager.php b/lib/private/Config/PresetManager.php index e35f193b2caa5..c75212b7156ca 100644 --- a/lib/private/Config/PresetManager.php +++ b/lib/private/Config/PresetManager.php @@ -243,11 +243,15 @@ private function getPresetApps(Preset $preset): array { 'disabled' => []], Preset::SHARED => [ - 'enabled' => ['external','twofactor_backupcodes','twofactor_totp','twofactor_webauthn'], + 'enabled' => ['external','twofactor_backupcodes','twofactor_totp','twofactor_webauthn', 'user_migration'], 'disabled' => ['user_status']], Preset::PRIVATE => [ - 'enabled' => ['twofactor_backupcodes','twofactor_totp','twofactor_webauthn'], + 'enabled' => ['twofactor_backupcodes','twofactor_totp','twofactor_webauthn', 'user_migration'], + 'disabled' => []], + Preset::CLUB, Preset::FAMILY, Preset::SCHOOL, Preset::UNIVERSITY, + => [ + 'enabled' => ['user_migration'], 'disabled' => []], default => ['enabled' => [], 'disabled' => []], }; From 4cb8ae0cb7138ea5ffdcfd7165721ba26d8fd05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 2 Apr 2026 14:15:12 +0200 Subject: [PATCH 2/2] fix: Remove duplicated match values in PresetManager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/private/Config/PresetManager.php | 50 +++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/lib/private/Config/PresetManager.php b/lib/private/Config/PresetManager.php index c75212b7156ca..462273335e01c 100644 --- a/lib/private/Config/PresetManager.php +++ b/lib/private/Config/PresetManager.php @@ -233,25 +233,57 @@ public function retrieveLexiconPresetApps(): array { */ private function getPresetApps(Preset $preset): array { return match ($preset) { - Preset::CLUB, Preset::FAMILY, Preset::SCHOOL, Preset::SMALL, Preset::MEDIUM + Preset::CLUB, Preset::FAMILY, Preset::SCHOOL => [ - 'enabled' => ['user_status','guests','twofactor_backupcodes','twofactor_totp','twofactor_webauthn'], + 'enabled' => [ + 'user_status', + 'guests', + 'twofactor_backupcodes', + 'twofactor_totp', + 'twofactor_webauthn', + 'user_migration', + ], 'disabled' => []], - Preset::UNIVERSITY, Preset::LARGE + Preset::SMALL, Preset::MEDIUM + => [ + 'enabled' => [ + 'user_status', + 'guests', + 'twofactor_backupcodes', + 'twofactor_totp', + 'twofactor_webauthn', + ], + 'disabled' => []], + Preset::UNIVERSITY + => [ + 'enabled' => [ + 'user_status', + 'guests', + 'user_migration', + ], + 'disabled' => []], + Preset::LARGE => [ 'enabled' => ['user_status','guests'], 'disabled' => []], Preset::SHARED => [ - 'enabled' => ['external','twofactor_backupcodes','twofactor_totp','twofactor_webauthn', 'user_migration'], + 'enabled' => [ + 'external', + 'twofactor_backupcodes', + 'twofactor_totp', + 'twofactor_webauthn', + 'user_migration', + ], 'disabled' => ['user_status']], Preset::PRIVATE => [ - 'enabled' => ['twofactor_backupcodes','twofactor_totp','twofactor_webauthn', 'user_migration'], - 'disabled' => []], - Preset::CLUB, Preset::FAMILY, Preset::SCHOOL, Preset::UNIVERSITY, - => [ - 'enabled' => ['user_migration'], + 'enabled' => [ + 'twofactor_backupcodes', + 'twofactor_totp', + 'twofactor_webauthn', + 'user_migration', + ], 'disabled' => []], default => ['enabled' => [], 'disabled' => []], };