phabricator: use custom login plugin (stg)

This commit is contained in:
Martin Krizek 2015-11-05 14:33:32 +00:00
parent ee10ec1a11
commit c51d650e3f
3 changed files with 27 additions and 0 deletions

View file

@ -93,6 +93,12 @@
notify: notify:
- restart phd - restart phd
- name: copy phabricator custom login plugin
when: deployment_type == 'qa-stg'
template: src=CustomLoginHandler.php.j2 dest={{ phabroot }}/phabricator/src/extensions/CustomLoginHandler.php owner=apache group=apache mode=0644
notify:
- restart phd
# this isn't well supported upstream right now, disabling # this isn't well supported upstream right now, disabling
#- name: generate chatbot config #- name: generate chatbot config
# template: src=chatbot-config.json.j2 dest={{ phabroot }}/phabricator/resources/chatbot/config.json owner=apache group=apache mode=0644 # template: src=chatbot-config.json.j2 dest={{ phabroot }}/phabricator/resources/chatbot/config.json owner=apache group=apache mode=0644

View file

@ -0,0 +1,19 @@
<?php
final class CustomLoginHandler
extends PhabricatorAuthLoginHandler {
public function getAuthLoginHeaderContent() {
return phutil_safe_html("
<center><h1>Logging in to Fedora QA Devel Phabricator</h1></center>
<p style='max-width: 508px;margin: 16px auto;'>
This phabricator instance is only setup for authentication with <a href='https://admin.fedoraproject.org/accounts'>the Fedora Accounts System</a>. If you have previously logged in to this instance, click o n the 'Login or Register' button to log in again. If you are new to this system, please follow the follow
ing guidelines:
<ul style='list-style-type: disc; margin: auto; max-width:508px;'>
<li style='list-style-type: disc;'>When you login with Persona, make sure to use your <b>fasusername@fedoraproject.org</b> email alias (replacing 'fasusername' with your FAS user)</li>
<li>When creating a phabricator user account, please match the account name with your FAS username for less confusion on everyone elses' part</li>
<li>If you have any questions, come find us in #fedora-qa on Freenode or on the <a href='https://admin.fedoraproject.org/mailman/listinfo/qa-devel'>Fedora QA Devel mailing list</a>.</li>
</ul>
</p>");
}
}

View file

@ -25,6 +25,7 @@
"metamta.mail-adapter" : "{{ "PhabricatorMailImplementationPHPMailerAdapter" if phabricator_mail_enabled else "PhabricatorMailImplementationTestAdapter"}}", "metamta.mail-adapter" : "{{ "PhabricatorMailImplementationPHPMailerAdapter" if phabricator_mail_enabled else "PhabricatorMailImplementationTestAdapter"}}",
"phpmailer.smtp-host" : "bastion.phx2.fedoraproject.org", "phpmailer.smtp-host" : "bastion.phx2.fedoraproject.org",
"auth.email-domains" : ["fedoraproject.org"], "auth.email-domains" : ["fedoraproject.org"],
{% if deployment_type == 'qadevel-prod' %}
"auth.login-message" : "<center><h1>Logging in to Fedora QA Devel Phabricator</h1></center> "auth.login-message" : "<center><h1>Logging in to Fedora QA Devel Phabricator</h1></center>
<p style='max-width: 508px;margin: 16px auto;'> <p style='max-width: 508px;margin: 16px auto;'>
This phabricator instance is only setup for authentication with <a href='https://admin.fedoraproject.org/accounts'>the Fedora Accounts System</a>. If you have previously logged in to this instance, click on the 'Login or Register' button to log in again. If you are new to this system, please follow the follow This phabricator instance is only setup for authentication with <a href='https://admin.fedoraproject.org/accounts'>the Fedora Accounts System</a>. If you have previously logged in to this instance, click on the 'Login or Register' button to log in again. If you are new to this system, please follow the follow
@ -35,6 +36,7 @@ ing guidelines:
<li>If you have any questions, come find us in #fedora-qa on Freenode or on the <a href='https://admin.fedoraproject.org/mailman/listinfo/qa-devel'>Fedora QA Devel mailing list</a>.</li> <li>If you have any questions, come find us in #fedora-qa on Freenode or on the <a href='https://admin.fedoraproject.org/mailman/listinfo/qa-devel'>Fedora QA Devel mailing list</a>.</li>
</ul> </ul>
</p>", </p>",
{% endif %}
"phabricator.uninstalled-applications" : { "phabricator.uninstalled-applications" : {
"PhabricatorApplicationPhame" : true, "PhabricatorApplicationPhame" : true,
"PhabricatorApplicationDiviner" : true, "PhabricatorApplicationDiviner" : true,