From d5aaa54d0b8f94db19c3536aec42deab7d743f7f Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 14 Aug 2012 19:11:46 -0700 Subject: [PATCH] Allow installs to configure an arbitrary block of HTML to show on the login screen Summary: For secure.phabricator.com, I've wanted to put up a "you can use demo/demo" message for a while. Wikimedia also wants to add some custom login instructions. Test Plan: Configured this: 'auth.login-message' => '
'. 'Welcome! Lorem ipsum...'. '
', ...got this: {F17167} Reviewers: btrahan, vrana Reviewed By: btrahan CC: aran, jeremyb Maniphest Tasks: T1637 Differential Revision: https://secure.phabricator.com/D3288 --- conf/default.conf.php | 5 +++++ .../auth/controller/PhabricatorLoginController.php | 3 +++ 2 files changed, 8 insertions(+) diff --git a/conf/default.conf.php b/conf/default.conf.php index b82fea4590..64ffefd802 100644 --- a/conf/default.conf.php +++ b/conf/default.conf.php @@ -554,6 +554,11 @@ return array( // but rejects "joe@mail.yourcompany.com". 'auth.email-domains' => array(), + // You can provide an arbitrary block of HTML here, which will appear on the + // login screen. Normally, you'd use this to provide login or registration + // instructions to users. + 'auth.login-message' => null, + // -- Accounts -------------------------------------------------------------- // diff --git a/src/applications/auth/controller/PhabricatorLoginController.php b/src/applications/auth/controller/PhabricatorLoginController.php index 2af18468dc..a21114eb87 100644 --- a/src/applications/auth/controller/PhabricatorLoginController.php +++ b/src/applications/auth/controller/PhabricatorLoginController.php @@ -283,9 +283,12 @@ final class PhabricatorLoginController $panel->appendChild('
'); } + $login_message = PhabricatorEnv::getEnvConfig('auth.login-message'); + return $this->buildStandardPageResponse( array( $error_view, + $login_message, $panel, ), array(