From f99c7beb90fd20f2be51598032c89179bc12fab1 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 20 May 2015 14:21:33 -0700 Subject: [PATCH] Fully remove all the public-create-mail settings Summary: Fixes T5703. These have been unused in production for a while and the new stuff seems good. Test Plan: Mostly `grep`. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T5703 Differential Revision: https://secure.phabricator.com/D12949 --- .../PhabricatorExtraConfigSetupCheck.php | 9 ++++ .../config/PhabricatorFilesConfigOptions.php | 14 ----- .../PhabricatorManiphestConfigOptions.php | 51 ------------------- .../ManiphestTaskEditController.php | 15 +----- .../config/PhabricatorPasteConfigOptions.php | 14 ----- 5 files changed, 10 insertions(+), 93 deletions(-) diff --git a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php index 2d69334c47..a88dff0f22 100644 --- a/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php +++ b/src/applications/config/check/PhabricatorExtraConfigSetupCheck.php @@ -171,6 +171,10 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { 'Phabricator no longer supports global customization of monospaced '. 'fonts.'); + $public_mail_reason = pht( + 'Inbound mail addresses are now configured for each application '. + 'in the Applications tool.'); + $ancient_config += array( 'phid.external-loaders' => pht( @@ -256,6 +260,11 @@ final class PhabricatorExtraConfigSetupCheck extends PhabricatorSetupCheck { 'search.engine-selector' => pht( 'Phabricator now automatically discovers available search engines '. 'at runtime.'), + + 'metamta.files.public-create-email' => $public_mail_reason, + 'metamta.maniphest.public-create-email' => $public_mail_reason, + 'metamta.maniphest.default-public-author' => $public_mail_reason, + 'metamta.paste.public-create-email' => $public_mail_reason, ); return $ancient_config; diff --git a/src/applications/files/config/PhabricatorFilesConfigOptions.php b/src/applications/files/config/PhabricatorFilesConfigOptions.php index 7f18da3e99..ac62d410fe 100644 --- a/src/applications/files/config/PhabricatorFilesConfigOptions.php +++ b/src/applications/files/config/PhabricatorFilesConfigOptions.php @@ -156,20 +156,6 @@ final class PhabricatorFilesConfigOptions "Set this to a valid Amazon S3 bucket to store files there. You ". "must also configure S3 access keys in the 'Amazon Web Services' ". "group.")), - $this->newOption( - 'metamta.files.public-create-email', - 'string', - null) - ->setLocked(true) - ->setLockedMessage(pht( - 'This configuration is deprecated. See description for details.')) - ->setSummary(pht('DEPRECATED - Allow uploaded files via email.')) - ->setDescription( - pht( - 'This config has been deprecated in favor of [[ '. - '/applications/view/PhabricatorFilesApplication/ | '. - 'application settings ]], which allow for multiple email '. - 'addresses and other functionality.')), $this->newOption( 'metamta.files.subject-prefix', 'string', diff --git a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php index c2b87629f0..04d59c9966 100644 --- a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php +++ b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php @@ -296,57 +296,6 @@ EOTEXT 'string', '[Maniphest]') ->setDescription(pht('Subject prefix for Maniphest mail.')), - $this->newOption( - 'metamta.maniphest.public-create-email', - 'string', - null) - ->setLocked(true) - ->setLockedMessage(pht( - 'This configuration is deprecated. See description for details.')) - ->setSummary(pht('DEPRECATED - Allow filing bugs via email.')) - ->setDescription( - pht( - 'This config has been deprecated in favor of [[ '. - '/applications/view/PhabricatorManiphestApplication/ | '. - 'application settings ]], which allow for multiple email '. - 'addresses and other functionality.'."\n\n". - 'You can configure an email address like '. - '"bugs@phabricator.example.com" which will automatically create '. - 'Maniphest tasks when users send email to it. This relies on the '. - '"From" address to authenticate users, so it is is not completely '. - 'secure. To set this up, enter a complete email address like '. - '"bugs@phabricator.example.com" and then configure mail to that '. - 'address so it routed to Phabricator (if you\'ve already '. - 'configured reply handlers, you\'re probably already done). See '. - '"Configuring Inbound Email" in the documentation for more '. - 'information.')), - $this->newOption( - 'metamta.maniphest.default-public-author', - 'string', - null) - ->setLocked(true) - ->setLockedMessage(pht( - 'This configuration is deprecated. See description for details.')) - ->setSummary(pht( - 'DEPRECATED - Username anonymous bugs are filed under.')) - ->setDescription( - pht( - 'This config has been deprecated in favor of [[ '. - '/applications/view/PhabricatorManiphestApplication/ | '. - 'application settings ]], which allow for multiple email '. - 'addresses each with its own default author, and other '. - 'functionality.'."\n\n". - 'If you enable `metamta.maniphest.public-create-email` and create '. - 'an email address like "bugs@phabricator.example.com", it will '. - 'default to rejecting mail which doesn\'t come from a known user. '. - 'However, you might want to let anyone send email to this '. - 'address; to do so, set a default author here (a Phabricator '. - 'username). A typical use of this might be to create a "System '. - 'Agent" user called "bugs" and use that name here. If you specify '. - 'a valid username, mail will always be accepted and used to '. - 'create a task, even if the sender is not a system user. The '. - 'original email address will be stored in an `From Email` field '. - 'on the task.')), $this->newOption( 'maniphest.priorities.unbreak-now', 'int', diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index 915ea6c33a..d9a4e44381 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -684,19 +684,7 @@ final class ManiphestTaskEditController extends ManiphestController { 'tokenizerID' => $project_tokenizer_id, )); - $description_control = new PhabricatorRemarkupControl(); - // "Upsell" creating tasks via email in create flows if the instance is - // configured for this awesomeness. - $email_create = PhabricatorEnv::getEnvConfig( - 'metamta.maniphest.public-create-email'); - if (!$task->getID() && $email_create) { - $email_hint = pht( - 'You can also create tasks by sending an email to: %s', - phutil_tag('tt', array(), $email_create)); - $description_control->setCaption($email_hint); - } - - $description_control + $description_control = id(new PhabricatorRemarkupControl()) ->setLabel(pht('Description')) ->setName('description') ->setID('description-textarea') @@ -706,7 +694,6 @@ final class ManiphestTaskEditController extends ManiphestController { $form ->appendChild($description_control); - if ($request->isAjax()) { $dialog = id(new AphrontDialogView()) ->setUser($user) diff --git a/src/applications/paste/config/PhabricatorPasteConfigOptions.php b/src/applications/paste/config/PhabricatorPasteConfigOptions.php index e12fdc954d..bb970905c4 100644 --- a/src/applications/paste/config/PhabricatorPasteConfigOptions.php +++ b/src/applications/paste/config/PhabricatorPasteConfigOptions.php @@ -21,20 +21,6 @@ final class PhabricatorPasteConfigOptions public function getOptions() { return array( - $this->newOption( - 'metamta.paste.public-create-email', - 'string', - null) - ->setLocked(true) - ->setLockedMessage(pht( - 'This configuration is deprecated. See description for details.')) - ->setSummary(pht('DEPRECATED - Allow creating pastes via email.')) - ->setDescription( - pht( - 'This config has been deprecated in favor of [[ '. - '/applications/view/PhabricatorPasteApplication/ | '. - 'application settings ]], which allow for multiple email '. - 'addresses and other functionality.')), $this->newOption( 'metamta.paste.subject-prefix', 'string',