summaryrefslogtreecommitdiffstats
path: root/template/en/default/account
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-05-12 11:40:56 +0200
committermkanat%bugzilla.org <>2006-05-12 11:40:56 +0200
commitd9cbb0f0a62bba345ed26ac68364bb441f41d35d (patch)
tree415d30523fb728a3192970a6d2b168b095f260dc /template/en/default/account
parentd7447bf95827d7e9da681d496a192fffbc2810a4 (diff)
downloadbugzilla-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar.gz
bugzilla-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar.xz
Bug 300410: Bugzilla::Auth needs to be restructured to not require a BEGIN block
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'template/en/default/account')
-rw-r--r--template/en/default/account/auth/ldap-error.html.tmpl52
-rw-r--r--template/en/default/account/auth/login-small.html.tmpl2
-rw-r--r--template/en/default/account/auth/login.html.tmpl14
-rw-r--r--template/en/default/account/prefs/account.html.tmpl29
4 files changed, 18 insertions, 79 deletions
diff --git a/template/en/default/account/auth/ldap-error.html.tmpl b/template/en/default/account/auth/ldap-error.html.tmpl
deleted file mode 100644
index dba43155b..000000000
--- a/template/en/default/account/auth/ldap-error.html.tmpl
+++ /dev/null
@@ -1,52 +0,0 @@
-[%# 1.0@bugzilla.org %]
-[%# The contents of this file are subject to the Mozilla Public
- # License Version 1.1 (the "License"); you may not use this file
- # except in compliance with the License. You may obtain a copy of
- # the License at http://www.mozilla.org/MPL/
- #
- # Software distributed under the License is distributed on an "AS
- # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- # implied. See the License for the specific language governing
- # rights and limitations under the License.
- #
- # The Original Code is the Bugzilla Bug Tracking System.
- #
- # The Initial Developer of the Original Code is Netscape Communications
- # Corporation. Portions created by Netscape are
- # Copyright (C) 1998 Netscape Communications Corporation. All
- # Rights Reserved.
- #
- # Contributor(s): Bradley Baetz <bbaetz@acm.org>
- #%]
-
-[%# INTERFACE:
- # auth_err_tag: string. The tag for the error
- # info: hash. Additional variables which may be used when printing details
- # of the error.
- #%]
-
-[% PROCESS global/variables.none.tmpl %]
-
-[% admindocslinks = {'extraconfig.html#bzldap' => 'Setting up LDAP authentication'} %]
-
-[% SWITCH auth_err_tag %]
- [% CASE "cannot_retreive_attr" %]
- The specified LDAP attribute [% info.attr FILTER html %] was not found.
-
- [% CASE "connect_failed" %]
- An error occurred while trying to connect to the LDAP server.
- [% IF info.errstr %]
- The error from the server was: <tt>[% info.errstr FILTER html %]</tt>.
- [% END %]
-
- [% CASE "no_userid" %]
- [% terms.Bugzilla %] created a new account for you, but then could not find the
- new userid.
-
- [% CASE "server_not_defined" %]
- The LDAP server for authentication has not been defined.
-
- [% CASE %]
- Unhandled authentication error: <tt>[% auth_err_tag FILTER html %]</tt>
-
-[% END %]
diff --git a/template/en/default/account/auth/login-small.html.tmpl b/template/en/default/account/auth/login-small.html.tmpl
index a18ee70a2..ca500a8aa 100644
--- a/template/en/default/account/auth/login-small.html.tmpl
+++ b/template/en/default/account/auth/login-small.html.tmpl
@@ -79,7 +79,7 @@
[%# For now, password change requests only apply to the DB
# verification method #%]
- [% IF has_db != 0 %]
+ [% IF user.authorizer.can_change_password %]
<td>[ <a href="index.cgi?GoAheadAndLogIn=1#forgot">Forgot my Password</a> ]</td>
[% END %]
</tr>
diff --git a/template/en/default/account/auth/login.html.tmpl b/template/en/default/account/auth/login.html.tmpl
index d2c4950e4..adbae970a 100644
--- a/template/en/default/account/auth/login.html.tmpl
+++ b/template/en/default/account/auth/login.html.tmpl
@@ -22,7 +22,6 @@
[%# INTERFACE:
# target: string. URL to go to after login.
- # has_db: true if DB is one of the available authentication mechanisms
#%]
[% PROCESS global/variables.none.tmpl %]
@@ -100,9 +99,7 @@
# their password, assuming that our auth method allows that.
#%]
-[% IF caneditaccount %]
-
- [% IF Param("createemailregexp") %]
+ [% IF Param("createemailregexp") && user.authorizer.user_can_create_account %]
<hr>
<p>
@@ -111,10 +108,7 @@
</p>
[% END %]
- [%# For now, password change requests only apply to the DB
- # verification method #%]
-
- [% IF has_db != 0 %]
+ [% IF user.authorizer.can_change_password %]
<hr>
<a name="forgot"></a>
@@ -126,10 +120,6 @@
<input size="35" name="loginname">
<input type="submit" value="Submit Request">
</form>
-
[% END %]
- <hr>
-[% END %]
-
[% PROCESS global/footer.html.tmpl %]
diff --git a/template/en/default/account/prefs/account.html.tmpl b/template/en/default/account/prefs/account.html.tmpl
index dc936d43c..e914ecf6c 100644
--- a/template/en/default/account/prefs/account.html.tmpl
+++ b/template/en/default/account/prefs/account.html.tmpl
@@ -42,20 +42,21 @@
<tr>
<td colspan="2"><hr></td>
</tr>
+ [% IF user.authorizer.can_change_password %]
+ <tr>
+ <th align="right">New password:</th>
+ <td>
+ <input type="password" name="new_password1">
+ </td>
+ </tr>
- <tr>
- <th align="right">New password:</th>
- <td>
- <input type="password" name="new_password1">
- </td>
- </tr>
-
- <tr>
- <th align="right">Re-enter new password:</th>
- <td>
- <input type="password" name="new_password2">
- </td>
- </tr>
+ <tr>
+ <th align="right">Re-enter new password:</th>
+ <td>
+ <input type="password" name="new_password2">
+ </td>
+ </tr>
+ [% END %]
<tr>
<th align="right">Your real name (optional, but encouraged):</th>
@@ -64,7 +65,7 @@
</td>
</tr>
- [% IF Param('allowemailchange') %]
+ [% IF user.authorizer.can_change_email && Param('allowemailchange') %]
[% IF login_change_date %]
[% IF new_login_name %]
<tr>