Commit a9a03e40 authored by jake%bugzilla.org's avatar jake%bugzilla.org

Bug 83044 - Any page is now capable of being a login page simply by adding the…

Bug 83044 - Any page is now capable of being a login page simply by adding the ?GoAheadAndLogin=1 option to the URL. All links have been changed to make index.cgi the default login page instead of query.cgi. r=joel, a=justdave
parent 2de4d831
...@@ -51,6 +51,7 @@ sub login { ...@@ -51,6 +51,7 @@ sub login {
# (double cookies, odd compat code settings, etc) # (double cookies, odd compat code settings, etc)
return $user if $user->id; return $user if $user->id;
$type = LOGIN_REQUIRED if Bugzilla->cgi->param('GoAheadAndLogIn');
$type = LOGIN_NORMAL unless defined $type; $type = LOGIN_NORMAL unless defined $type;
# Log in using whatever methods are defined in user_info_class. # Log in using whatever methods are defined in user_info_class.
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<p> <p>
When the e-mail arrives, When the e-mail arrives,
<a href="query.cgi?GoAheadAndLogIn=1">log in here</a>. <a href="index.cgi?GoAheadAndLogIn=1">log in here</a>.
</p> </p>
[% PROCESS global/footer.html.tmpl %] [% PROCESS global/footer.html.tmpl %]
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
[% ELSIF message_tag == "logged_out" %] [% ELSIF message_tag == "logged_out" %]
[% title = "Logged Out" %] [% title = "Logged Out" %]
[% url = "query.cgi?GoAheadAndLogIn=1" %] [% url = "index.cgi?GoAheadAndLogIn=1" %]
[% link = "Log in again." %] [% link = "Log in again." %]
<b>Your login has been forgotten</b>. <b>Your login has been forgotten</b>.
The cookie that was remembering your login is now gone. You will be The cookie that was remembering your login is now gone. You will be
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
[% IF Param('createemailregexp') %] [% IF Param('createemailregexp') %]
| <a href="createaccount.cgi">New&nbsp;Account</a> | <a href="createaccount.cgi">New&nbsp;Account</a>
[% END %] [% END %]
| <a href="query.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a> | <a href="index.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
[% END %] [% END %]
</div> </div>
</div> </div>
......
...@@ -72,7 +72,7 @@ function addSidebar() { ...@@ -72,7 +72,7 @@ function addSidebar() {
<li id="logout"><a href="relogin.cgi">Logout [% user.login FILTER html %]</a></li> <li id="logout"><a href="relogin.cgi">Logout [% user.login FILTER html %]</a></li>
[% END %] [% END %]
[% ELSE %] [% ELSE %]
<li id="login"><a href="query.cgi?GoAheadAndLogIn=1">Log in to an existing account</a></li> <li id="login"><a href="index.cgi?GoAheadAndLogIn=1">Log in to an existing account</a></li>
[% IF Param('createemailregexp') %] [% IF Param('createemailregexp') %]
<li id="account"><a href="createaccount.cgi">Open a new [% terms.Bugzilla %] account</a></li> <li id="account"><a href="createaccount.cgi">Open a new [% terms.Bugzilla %] account</a></li>
[% END %] [% END %]
......
...@@ -113,7 +113,7 @@ function normal_keypress_handler( aEvent ) { ...@@ -113,7 +113,7 @@ function normal_keypress_handler( aEvent ) {
[% ELSE %] [% ELSE %]
<text class="text-link" onclick="load_relative_url('createaccount.cgi')" value="new user"/> <text class="text-link" onclick="load_relative_url('createaccount.cgi')" value="new user"/>
<text class="text-link" onclick="load_relative_url('query.cgi?GoAheadAndLogIn=1')" value="log in"/> <text class="text-link" onclick="load_relative_url('index.cgi?GoAheadAndLogIn=1')" value="log in"/>
[% END %] [% END %]
</box> </box>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment