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' =>
'<div style="width: 50%; margin: 1em auto; padding: 1em; border: 1px solid green; background: #dfffdf;">'.
'<strong>Welcome!</strong> Lorem ipsum...'.
'</div>',
...got this:
{F17167}
Reviewers: btrahan, vrana
Reviewed By: btrahan
CC: aran, jeremyb
Maniphest Tasks: T1637
Differential Revision: https://secure.phabricator.com/D3288
This commit is contained in:
@@ -554,6 +554,11 @@ return array(
|
|||||||
// but rejects "joe@mail.yourcompany.com".
|
// but rejects "joe@mail.yourcompany.com".
|
||||||
'auth.email-domains' => array(),
|
'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 -------------------------------------------------------------- //
|
// -- Accounts -------------------------------------------------------------- //
|
||||||
|
|
||||||
|
|||||||
@@ -283,9 +283,12 @@ final class PhabricatorLoginController
|
|||||||
$panel->appendChild('<br />');
|
$panel->appendChild('<br />');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$login_message = PhabricatorEnv::getEnvConfig('auth.login-message');
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
array(
|
array(
|
||||||
$error_view,
|
$error_view,
|
||||||
|
$login_message,
|
||||||
$panel,
|
$panel,
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
|
|||||||
Reference in New Issue
Block a user