From a4d874287ff6f9fea1d38e9a5844147a2e05bfad Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 3 Jun 2015 07:27:13 -0700 Subject: [PATCH] Allow administrators to configure "Email Settings" settings for lists Summary: Fixes T8387. This completes conversion of lists into users. These settings allow administrators to reduce the amount of mail delivered to lists, ahead of T5791. Test Plan: {F468206} Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T8387 Differential Revision: https://secure.phabricator.com/D13138 --- .../PhabricatorEmailPreferencesSettingsPanel.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php b/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php index 73c65dd7fe..13defb380e 100644 --- a/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php +++ b/src/applications/settings/panel/PhabricatorEmailPreferencesSettingsPanel.php @@ -15,8 +15,17 @@ final class PhabricatorEmailPreferencesSettingsPanel return pht('Email'); } + public function isEditableByAdministrators() { + if ($this->getUser()->getIsMailingList()) { + return true; + } + + return false; + } + public function processRequest(AphrontRequest $request) { - $user = $request->getUser(); + $viewer = $this->getViewer(); + $user = $this->getUser(); $preferences = $user->loadPreferences(); @@ -52,7 +61,7 @@ final class PhabricatorEmailPreferencesSettingsPanel $form = new AphrontFormView(); $form - ->setUser($user) + ->setUser($viewer) ->appendRemarkupInstructions( pht( 'These settings let you control how Phabricator notifies you about '.