Skip to content

Commit 8200909

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

File tree

5 files changed

+5
-38
lines changed

5 files changed

+5
-38
lines changed

apps/provisioning_api/lib/Controller/UsersController.php

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

719719
// Fallback to display name value to avoid changing behavior with the new option.
720-
if ($this->config->getSystemValue('allow_user_to_change_email', true)) {
720+
if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) {
721721
$permittedFields[] = IAccountManager::PROPERTY_EMAIL;
722722
}
723723

@@ -873,7 +873,8 @@ public function editUser(string $userId, string $key, string $value): DataRespon
873873
$permittedFields[] = IAccountManager::PROPERTY_DISPLAYNAME;
874874
}
875875

876-
if ($this->config->getSystemValue('allow_user_to_change_email', true)) {
876+
// Fallback to display name value to avoid changing behavior with the new option.
877+
if ($this->config->getSystemValue('allow_user_to_change_email', $allowDisplayNameChange)) {
877878
$permittedFields[] = IAccountManager::PROPERTY_EMAIL;
878879
}
879880

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
@@ -1284,7 +1284,6 @@
12841284
'OC\\Core\\Migrations\\Version29000Date20240124132202' => $baseDir . '/core/Migrations/Version29000Date20240124132202.php',
12851285
'OC\\Core\\Migrations\\Version29000Date20240131122720' => $baseDir . '/core/Migrations/Version29000Date20240131122720.php',
12861286
'OC\\Core\\Migrations\\Version30000Date20240814180800' => $baseDir . '/core/Migrations/Version30000Date20240814180800.php',
1287-
'OC\\Core\\Migrations\\Version32000Date20250402182800' => $baseDir . '/core/Migrations/Version32000Date20250402182800.php',
12881287
'OC\\Core\\Notification\\CoreNotifier' => $baseDir . '/core/Notification/CoreNotifier.php',
12891288
'OC\\Core\\Service\\LoginFlowV2Service' => $baseDir . '/core/Service/LoginFlowV2Service.php',
12901289
'OC\\DB\\Adapter' => $baseDir . '/lib/private/DB/Adapter.php',

lib/composer/composer/autoload_static.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
13171317
'OC\\Core\\Migrations\\Version29000Date20240124132202' => __DIR__ . '/../../..' . '/core/Migrations/Version29000Date20240124132202.php',
13181318
'OC\\Core\\Migrations\\Version29000Date20240131122720' => __DIR__ . '/../../..' . '/core/Migrations/Version29000Date20240131122720.php',
13191319
'OC\\Core\\Migrations\\Version30000Date20240814180800' => __DIR__ . '/../../..' . '/core/Migrations/Version30000Date20240814180800.php',
1320-
'OC\\Core\\Migrations\\Version32000Date20250402182800' => __DIR__ . '/../../..' . '/core/Migrations/Version32000Date20250402182800.php',
13211320
'OC\\Core\\Notification\\CoreNotifier' => __DIR__ . '/../../..' . '/core/Notification/CoreNotifier.php',
13221321
'OC\\Core\\Service\\LoginFlowV2Service' => __DIR__ . '/../../..' . '/core/Service/LoginFlowV2Service.php',
13231322
'OC\\DB\\Adapter' => __DIR__ . '/../../..' . '/lib/private/DB/Adapter.php',

lib/private/User/User.php

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

443443
public function canChangeEmail(): bool {
444-
return $this->config->getSystemValueBool('allow_user_to_change_email', true);
444+
// Fallback to display name value to avoid changing behavior with the new option.
445+
return $this->config->getSystemValueBool('allow_user_to_change_email', $this->config->getSystemValueBool('allow_user_to_change_display_name', true));
445446
}
446447

447448
/**

0 commit comments

Comments
 (0)