From 0bd19d8ed977e6c19656db7af25a2e682219da1d Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sun, 15 Jun 2025 00:08:58 +0200 Subject: [PATCH] Allow admins to edit email addresses of mailing list accounts again Summary: rP04b9f946020de32c513b69954933630641e8ff8f introduced `isEditableByAdministrators()` in `src/applications/settings/panel/PhabricatorSettingsPanel.php`. In rP421bf2e548f06411a2ce86583333ec5e3e92c643, `isEditableByAdministrators()` was renamed to `isManagementPanel()`. Thus the addition of `isEditableByAdministrators()` to `src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php` in rPe0a3e6ba3b87f96c83905e7188bb6161f7480784 had no effect - that function has no callers anywhere in the codebase. Fix that by using the correct function name. Closes T16110 Test Plan: * As an admin, go to http://phorge.localhost/settings/user/SomeMailingListUser/, see new item "Email Addresses" in the panel on the left. * As an admin, go to http://phorge.localhost/settings/user/SomeMailingListUser/page/email/ directly, don't get a 404 anymore. * As a non-admin, go to http://phorge.localhost/settings/user/SomeMailingListUser/page/email/ and get a 404 as before. * As an admin, on http://phorge.localhost/settings/user/SomeMailingListUser/page/email/ directly, add a new email address, mark it as primary, be able to remove the old email address. Check the `phabricator_user.user_email` DB table that the account's email address has been correctly updated. Reviewers: O1 Blessed Committers, mainframe98, valerio.bozzolan Reviewed By: O1 Blessed Committers, mainframe98, valerio.bozzolan Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16110 Differential Revision: https://we.phorge.it/D26087 --- .../settings/panel/PhabricatorEmailAddressesSettingsPanel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php index 665bb42b2f..8c06246a66 100644 --- a/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailAddressesSettingsPanel.php @@ -19,7 +19,7 @@ final class PhabricatorEmailAddressesSettingsPanel return PhabricatorSettingsEmailPanelGroup::PANELGROUPKEY; } - public function isEditableByAdministrators() { + public function isManagementPanel() { if ($this->getUser()->getIsMailingList()) { return true; } -- 2.51.2