Page MenuHomePhabricator

D19994.diff
No OneTemporary

D19994.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -9,7 +9,7 @@
'names' => array(
'conpherence.pkg.css' => '3c8a0668',
'conpherence.pkg.js' => '020aebcf',
- 'core.pkg.css' => '7fa376a9',
+ 'core.pkg.css' => 'e94cc920',
'core.pkg.js' => '5c737607',
'differential.pkg.css' => 'b8df73d4',
'differential.pkg.js' => '67c9ea4c',
@@ -36,7 +36,7 @@
'rsrc/css/aphront/typeahead-browse.css' => 'b7ed02d2',
'rsrc/css/aphront/typeahead.css' => '8779483d',
'rsrc/css/application/almanac/almanac.css' => '2e050f4f',
- 'rsrc/css/application/auth/auth.css' => '9f6e4ed8',
+ 'rsrc/css/application/auth/auth.css' => 'add92fd8',
'rsrc/css/application/base/main-menu-view.css' => '8e2d9a28',
'rsrc/css/application/base/notification-menu.css' => 'e6962e89',
'rsrc/css/application/base/phui-theme.css' => '35883b37',
@@ -524,7 +524,7 @@
'aphront-tooltip-css' => 'e3f2412f',
'aphront-typeahead-control-css' => '8779483d',
'application-search-view-css' => '0f7c06d8',
- 'auth-css' => '9f6e4ed8',
+ 'auth-css' => 'add92fd8',
'bulk-job-css' => '73af99f5',
'conduit-api-css' => 'ce2cfc41',
'config-options-css' => '16c920ae',
diff --git a/src/applications/auth/controller/PhabricatorAuthLoginController.php b/src/applications/auth/controller/PhabricatorAuthLoginController.php
--- a/src/applications/auth/controller/PhabricatorAuthLoginController.php
+++ b/src/applications/auth/controller/PhabricatorAuthLoginController.php
@@ -17,6 +17,7 @@
if ($parameter_name == 'code') {
return true;
}
+
return parent::shouldAllowRestrictedParameter($parameter_name);
}
diff --git a/src/applications/auth/controller/PhabricatorAuthStartController.php b/src/applications/auth/controller/PhabricatorAuthStartController.php
--- a/src/applications/auth/controller/PhabricatorAuthStartController.php
+++ b/src/applications/auth/controller/PhabricatorAuthStartController.php
@@ -194,6 +194,8 @@
$invite_message = $this->renderInviteHeader($invite);
}
+ $custom_message = $this->newCustomStartMessage();
+
$crumbs = $this->buildApplicationCrumbs();
$crumbs->addTextCrumb(pht('Login'));
$crumbs->setBorder(true);
@@ -202,6 +204,7 @@
$view = array(
$header,
$invite_message,
+ $custom_message,
$out,
);
@@ -305,4 +308,25 @@
->setURI($auto_uri);
}
+ private function newCustomStartMessage() {
+ $viewer = $this->getViewer();
+
+ $text = PhabricatorAuthMessage::loadMessageText(
+ $viewer,
+ PhabricatorAuthLoginMessageType::MESSAGEKEY);
+
+ if (!strlen($text)) {
+ return null;
+ }
+
+ $remarkup_view = new PHUIRemarkupView($viewer, $text);
+
+ return phutil_tag(
+ 'div',
+ array(
+ 'class' => 'auth-custom-message',
+ ),
+ $remarkup_view);
+ }
+
}
diff --git a/src/applications/auth/storage/PhabricatorAuthMessage.php b/src/applications/auth/storage/PhabricatorAuthMessage.php
--- a/src/applications/auth/storage/PhabricatorAuthMessage.php
+++ b/src/applications/auth/storage/PhabricatorAuthMessage.php
@@ -61,6 +61,22 @@
return $this->getMessageType()->getDisplayName();
}
+ public static function loadMessageText(
+ PhabricatorUser $viewer,
+ $message_key) {
+
+ $message = id(new PhabricatorAuthMessageQuery())
+ ->setViewer($viewer)
+ ->withMessageKeys(array($message_key))
+ ->executeOne();
+
+ if (!$message) {
+ return null;
+ }
+
+ return $message->getMessageText();
+ }
+
/* -( PhabricatorPolicyInterface )----------------------------------------- */
diff --git a/webroot/rsrc/css/application/auth/auth.css b/webroot/rsrc/css/application/auth/auth.css
--- a/webroot/rsrc/css/application/auth/auth.css
+++ b/webroot/rsrc/css/application/auth/auth.css
@@ -55,3 +55,12 @@
.auth-account-view-account-uri {
word-break: break-word;
}
+
+.auth-custom-message {
+ margin: 32px auto 64px;
+ max-width: 548px;
+ background: #fff;
+ padding: 16px;
+ border: 1px solid {$lightblueborder};
+ border-radius: 4px;
+}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 22, 11:02 AM (5 h, 23 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7031036
Default Alt Text
D19994.diff (4 KB)

Event Timeline