mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 01:55:56 -04:00
fix: Remove duplicated match values in PresetManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
8acbf54a87
commit
9e55ead452
1 changed files with 41 additions and 9 deletions
|
|
@ -233,25 +233,57 @@ class PresetManager {
|
|||
*/
|
||||
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' => []],
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue