diff options
author | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:19:50 +0200 |
---|---|---|
committer | Dylan William Hardison <dylan@hardison.net> | 2018-10-14 18:19:50 +0200 |
commit | ce00a61057535d49aa0e83181a1d317d7842571b (patch) | |
tree | 280243de9ff791449fb2c82f3f0f2b9bd931d5b2 /extensions/Persona/template/en/default/hook | |
parent | 6367a26da4093a8379e370ef328e9507c98b2e7e (diff) | |
parent | 6657fa9f5210d5b5a9b14c0cba6882bd56232054 (diff) | |
download | bugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.gz bugzilla-ce00a61057535d49aa0e83181a1d317d7842571b.tar.xz |
Merge remote-tracking branch 'bmo/master'
Diffstat (limited to 'extensions/Persona/template/en/default/hook')
5 files changed, 0 insertions, 141 deletions
diff --git a/extensions/Persona/template/en/default/hook/account/auth/login-additional_methods.html.tmpl b/extensions/Persona/template/en/default/hook/account/auth/login-additional_methods.html.tmpl deleted file mode 100644 index 1743db9a6..000000000 --- a/extensions/Persona/template/en/default/hook/account/auth/login-additional_methods.html.tmpl +++ /dev/null @@ -1,9 +0,0 @@ -[% IF Param('user_info_class').split(',').contains('Persona') - && Param('persona_includejs_url') %] -<p> - <img src="extensions/Persona/web/images/persona_sign_in.png" width="185" height="25" class="persona_sign_in"> -</p> -<p> - <strong>Note:</strong> Persona authentication will be removed on October 25th, 2016 (<a href="page.cgi?id=persona_deprecated.html">more info</a>). -</p> -[% END %] diff --git a/extensions/Persona/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl b/extensions/Persona/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl deleted file mode 100644 index 364d1528f..000000000 --- a/extensions/Persona/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -[% IF Param('user_info_class').split(',').contains('Persona') - && Param('persona_includejs_url') %] -<script [% script_nonce FILTER none %]> - YAHOO.util.Event.addListener('login_link[% qs_suffix FILTER js %]','click', function () { - var login_link = YAHOO.util.Dom.get('persona_mini_login[% qs_suffix FILTER js %]'); - YAHOO.util.Dom.removeClass(login_link, 'bz_default_hidden'); - }); - YAHOO.util.Event.addListener('hide_mini_login[% qs_suffix FILTER js %]','click', function () { - var login_link = YAHOO.util.Dom.get('persona_mini_login[% qs_suffix FILTER js %]'); - YAHOO.util.Dom.addClass(login_link, 'bz_default_hidden'); - }); -</script> -<span id="persona_mini_login[% qs_suffix FILTER html %]" class="bz_default_hidden"> - <img src="extensions/Persona/web/images/sign_in.png" height="22" width="75" align="absmiddle" - title="Sign in with Persona" class='persona_sign_in'> or -</span> -[% END %] diff --git a/extensions/Persona/template/en/default/hook/account/create-additional_methods.html.tmpl b/extensions/Persona/template/en/default/hook/account/create-additional_methods.html.tmpl deleted file mode 100644 index b6fb1eedc..000000000 --- a/extensions/Persona/template/en/default/hook/account/create-additional_methods.html.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% RETURN UNLESS Param('user_info_class').split(',').contains('Persona') %] - -Or, use your Persona account: -<img src="extensions/Persona/web/images/sign_in.png" class="persona_sign_in" - width="95" height="25" align="absmiddle"> diff --git a/extensions/Persona/template/en/default/hook/global/header-additional_header.html.tmpl b/extensions/Persona/template/en/default/hook/global/header-additional_header.html.tmpl deleted file mode 100644 index f60bd36db..000000000 --- a/extensions/Persona/template/en/default/hook/global/header-additional_header.html.tmpl +++ /dev/null @@ -1,90 +0,0 @@ -[%# This Source Code Form is subject to the terms of the Mozilla Public - # License, v. 2.0. If a copy of the MPL was not distributed with this - # file, You can obtain one at http://mozilla.org/MPL/2.0/. - # - # This Source Code Form is "Incompatible With Secondary Licenses", as - # defined by the Mozilla Public License, v. 2.0. - #%] - -[% RETURN UNLESS Param('persona_includejs_url') - && Param('user_info_class').split(',').contains('Persona') %] - -[%# for now don't inject persona javascript on authenticated users. - # we've seen sessions being logged out unexpectedly - # we should only inject this code for users who used persona to authenicate %] -[% RETURN IF user.id %] - -[% USE Bugzilla %] -[% cgi = Bugzilla.cgi %] - -<script [% script_nonce FILTER none %] defer src="[% Param('persona_includejs_url') %]"></script> -<script [% script_nonce FILTER none %]> - -function createHidden(name, value, form) { - var field = document.createElement('input'); - field.type = 'hidden'; - field.name = name; - field.value = value;; - form.appendChild(field); -} - -[% login_target = cgi.url("-relative" => 1, "-query" => 1) %] -[% IF !login_target - OR login_target.match("^token\.cgi") - OR login_target.match("^createaccount\.cgi") %] - [% login_target = "index.cgi" %] -[% END %] -[% login_target = urlbase _ login_target %] - -[%# we only want to honour explicit login requests %] -var persona_ignore_login = true; - -function persona_onlogin(assertion) { - if (persona_ignore_login) - return; - [% IF !user.id %] - var form = document.createElement('form'); - form.action = '[% login_target FILTER js %]'; - form.method = 'POST'; - form.style.display = 'none'; - - createHidden('token', '[% issue_hash_token(['login']) FILTER js %]', form); - createHidden('Bugzilla_remember', 'on', form); - createHidden('persona_assertion', assertion, form); - - [% FOREACH field = cgi.param() %] - [% NEXT IF field.search('^(Bugzilla_(login|password|restrictlogin)|token|persona_assertion)$') %] - [% NEXT UNLESS cgi.param(field).can('slice') %] - [% FOREACH mvalue = cgi.param(field).slice(0) %] - createHidden('[% field FILTER js %]', '[% mvalue FILTER html_linebreak FILTER js %]', form); - [% END %] - [% END %] - - document.body.appendChild(form); - form.submit(); - [% END %] -} - -YAHOO.util.Event.on(window, 'load', persona_init); -function persona_init() { - navigator.id.watch({ - [%# we can't set loggedInUser to user.login as this causes cgi authenticated - sessions to be logged out by persona %] - loggedInUser: null, - onlogin: persona_onlogin, - onlogout: function () { - [%# this should be redirecting to index.cgi?logout=1 however there's a - persona bug which causes this to break chrome and safari logins. - https://github.com/mozilla/browserid/issues/2423 %] - } - }); -} - -function persona_sign_in() { - persona_ignore_login = false; - navigator.id.request({ siteName: '[% terms.BugzillaTitle FILTER js %]' }); -} -$(function() { - $('.persona_sign_in').on("click", persona_sign_in); -}); -</script> diff --git a/extensions/Persona/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/Persona/template/en/default/hook/global/user-error-errors.html.tmpl deleted file mode 100644 index f2e5bda24..000000000 --- a/extensions/Persona/template/en/default/hook/global/user-error-errors.html.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -[% IF error == "persona_account_too_powerful" %] - [% title = "Account Too Powerful" %] - Your account is a member of a group which is not permitted to use Persona to - log in. Please log in with your [% terms.Bugzilla %] username and password. - <br><br> - (Persona logins are disabled for accounts which are members of certain - particularly sensitive groups, while we gain experience with the technology.) -[% ELSIF error == "persona_server_fail" %] - An error occurred during communication with the Persona servers: - <br> - [% reason FILTER html %] -[% END %] |