Skip to content

Commit d44b42f

Browse files
committed
Revert "refactor: add migration for email setting"
This reverts commit e7859f0. Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 6c708a9 commit d44b42f

5 files changed

Lines changed: 5 additions & 38 deletions

File tree

apps/provisioning_api/lib/Controller/UsersController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ public function getEditableFieldsForUser(string $userId): DataResponse {
753753
}
754754

755755
// Fallback to display name value to avoid changing behavior with the new option.
756-
if ($this->config->getSystemValue('allow_user_to_change_email', true)) {
756+
if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) {
757757
$permittedFields[] = IAccountManager::PROPERTY_EMAIL;
758758
}
759759

@@ -913,7 +913,8 @@ public function editUser(string $userId, string $key, string $value): DataRespon
913913
$permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME;
914914
}
915915

916-
if ($this->config->getSystemValue('allow_user_to_change_email', true)) {
916+
// Fallback to display name value to avoid changing behavior with the new option.
917+
if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) {
917918
$permittedFields[] = IAccountManager::PROPERTY_EMAIL;
918919
}
919920

core/Migrations/Version32000Date20250402182800.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

lib/composer/composer/autoload_classmap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,6 @@
13771377
'OC\\Core\\Migrations\\Version30000Date20240814180800' => $baseDir . '/core/Migrations/Version30000Date20240814180800.php',
13781378
'OC\\Core\\Migrations\\Version30000Date20240815080800' => $baseDir . '/core/Migrations/Version30000Date20240815080800.php',
13791379
'OC\\Core\\Migrations\\Version30000Date20240906095113' => $baseDir . '/core/Migrations/Version30000Date20240906095113.php',
1380-
'OC\\Core\\Migrations\\Version32000Date20250402182800' => $baseDir . '/core/Migrations/Version32000Date20250402182800.php',
13811380
'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php',
13821381
'OC\\Core\\ResponseDefinitions' => $baseDir . '/core/ResponseDefinitions.php',
13831382
'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',

lib/composer/composer/autoload_static.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
14101410
'OC\\Core\\Migrations\\Version30000Date20240814180800' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240814180800.php',
14111411
'OC\\Core\\Migrations\\Version30000Date20240815080800' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240815080800.php',
14121412
'OC\\Core\\Migrations\\Version30000Date20240906095113' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240906095113.php',
1413-
'OC\\Core\\Migrations\\Version32000Date20250402182800' => __DIR__ . '/../../..' . '/core/Migrations/Version32000Date20250402182800.php',
14141413
'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php',
14151414
'OC\\Core\\ResponseDefinitions' => __DIR__ . '/../../..' . '/core/ResponseDefinitions.php',
14161415
'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',

lib/private/User/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ public function canChangeDisplayName() {
429429
}
430430

431431
public function canChangeEmail(): bool {
432-
return $this->config->getSystemValueBool('allow_user_to_change_email', true);
432+
// Fallback to display name value to avoid changing behavior with the new option.
433+
return $this->config->getSystemValueBool('allow_user_to_change_email', $this->config->getSystemValueBool('allow_user_to_change_display_name', true));
433434
}
434435

435436
/**

0 commit comments

Comments
 (0)