bugzilla working state
This commit is contained in:
parent
883f31932e
commit
ff7f3e705f
3 changed files with 135 additions and 0 deletions
8
ansible/roles/bugzilla/files/oidc-login.html
Normal file
8
ansible/roles/bugzilla/files/oidc-login.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta http-equiv="refresh" content="0;url=/">
|
||||
<script>
|
||||
var r = new URLSearchParams(window.location.search).get('redirect');
|
||||
if (r && r.startsWith('/')) window.location.replace(r);
|
||||
</script>
|
||||
</head><body>Redirecting...</body></html>
|
||||
|
|
@ -122,6 +122,33 @@
|
|||
replace: '"auth_env_realname" : "OIDC_CLAIM_name"'
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Deploy OIDC login redirect page
|
||||
copy:
|
||||
src: oidc-login.html
|
||||
dest: "{{ bugzilla_dir }}/oidc-login.html"
|
||||
owner: www-data
|
||||
group: www-data
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Ensure custom template directory exists
|
||||
file:
|
||||
path: "{{ bugzilla_dir }}/template/en/custom/global"
|
||||
state: directory
|
||||
owner: www-data
|
||||
group: www-data
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Deploy custom templates
|
||||
template:
|
||||
src: custom-common-links.html.tmpl.j2
|
||||
dest: "{{ bugzilla_dir }}/template/en/custom/global/common-links.html.tmpl"
|
||||
owner: www-data
|
||||
group: www-data
|
||||
when: oauth_client_id is defined
|
||||
|
||||
-
|
||||
name: Set Bugzilla file ownership
|
||||
file:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,100 @@
|
|||
[%# 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.
|
||||
#%]
|
||||
|
||||
[% DEFAULT qs_suffix = "" %]
|
||||
[% USE Bugzilla %]
|
||||
|
||||
<ul class="links">
|
||||
<li><a href="./">Home</a></li>
|
||||
<li><span class="separator">| </span><a href="enter_bug.cgi">New</a></li>
|
||||
<li><span class="separator">| </span><a href="describecomponents.cgi">Browse</a></li>
|
||||
<li><span class="separator">| </span><a href="query.cgi">Search</a></li>
|
||||
|
||||
<li class="form">
|
||||
<span class="separator">| </span>
|
||||
<form action="buglist.cgi" method="get"
|
||||
onsubmit="if (this.quicksearch.value == '')
|
||||
{ alert('Please enter one or more search terms first.');
|
||||
return false; } return true;">
|
||||
<input type="hidden" id="no_redirect[% qs_suffix FILTER html %]" name="no_redirect" value="0">
|
||||
<script type="text/javascript">
|
||||
if (history && history.replaceState) {
|
||||
var no_redirect = document.getElementById("no_redirect[% qs_suffix FILTER js %]");
|
||||
no_redirect.value = 1;
|
||||
}
|
||||
</script>
|
||||
<input class="txt" type="text" id="quicksearch[% qs_suffix FILTER html %]" name="quicksearch"
|
||||
title="Quick Search" value="[% quicksearch FILTER html %]">
|
||||
<input class="btn" type="submit" value="Search"
|
||||
id="find[% qs_suffix FILTER html %]">
|
||||
[%-# Work around FF bug: keep this on one line %]</form>
|
||||
<a href="page.cgi?id=quicksearch.html" title="Quicksearch Help">[?]</a></li>
|
||||
|
||||
<li><span class="separator">| </span><a href="report.cgi">Reports</a></li>
|
||||
|
||||
<li>
|
||||
[% IF Param('shutdownhtml') || Bugzilla.has_flags %]
|
||||
<span class="separator">| </span>
|
||||
[% IF user.id %]
|
||||
<a href="request.cgi?requester=[% user.login FILTER uri %]&requestee=
|
||||
[% user.login FILTER uri %]&do_union=1&group=type&action=queue">My Requests</a>
|
||||
[% ELSE %]
|
||||
<a href="request.cgi">Requests</a>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[%-# Work around FF bug: keep this on one line %]</li>
|
||||
|
||||
[% Hook.process('action-links') %]
|
||||
|
||||
[% IF user.login %]
|
||||
<li><span class="separator">| </span><a href="userprefs.cgi">Preferences</a></li>
|
||||
[% IF user.can_administer %]
|
||||
<li><span class="separator">| </span><a href="admin.cgi">Administration</a></li>
|
||||
[% END %]
|
||||
|
||||
[% PROCESS link_to_documentation %]
|
||||
|
||||
<li>
|
||||
<span class="separator">| </span>
|
||||
[% IF user.authorizer.can_logout %]
|
||||
<a href="index.cgi?logout=1">Log out</a>
|
||||
[% ELSE %]
|
||||
<a href="/logout">Log out</a>
|
||||
[% END %]
|
||||
[% IF sudoer %]
|
||||
[%+ sudoer.login FILTER html %] (<b>impersonating
|
||||
[%+ user.login FILTER html %]</b>
|
||||
<a href="relogin.cgi?action=end-sudo">end session</a>)
|
||||
[% ELSE %]
|
||||
[%+ user.login FILTER html %]
|
||||
[% END %]
|
||||
[%-# Work around FF bug: keep this on one line %]</li>
|
||||
[% ELSE %]
|
||||
|
||||
[% PROCESS link_to_documentation %]
|
||||
|
||||
<li>
|
||||
<span class="separator">| </span>
|
||||
<a href="#" onclick="window.location='/oidc-login?redirect='+encodeURIComponent(window.location.pathname+window.location.search);return false;">Log in</a>
|
||||
</li>
|
||||
<li>
|
||||
<span class="separator">| </span>
|
||||
<a href="#" onclick="window.location='/oidc-login?redirect='+encodeURIComponent(window.location.pathname+window.location.search);return false;">Register</a>
|
||||
</li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
||||
[% Hook.process("link-row") %]
|
||||
[% BLOCK link_to_documentation %]
|
||||
[% IF doc_section %]
|
||||
<li>
|
||||
<span class="separator">| </span>
|
||||
<a href="[% docs_urlbase _ doc_section FILTER html %]" target="_blank">Help</a>
|
||||
</li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
Loading…
Add table
Add a link
Reference in a new issue