From d9cbb0f0a62bba345ed26ac68364bb441f41d35d Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 12 May 2006 09:40:56 +0000 Subject: Bug 300410: Bugzilla::Auth needs to be restructured to not require a BEGIN block Patch By Max Kanat-Alexander r=LpSolit, a=myk --- .../en/default/account/auth/ldap-error.html.tmpl | 52 ---------------------- .../en/default/account/auth/login-small.html.tmpl | 2 +- template/en/default/account/auth/login.html.tmpl | 14 +----- 3 files changed, 3 insertions(+), 65 deletions(-) delete mode 100644 template/en/default/account/auth/ldap-error.html.tmpl (limited to 'template/en/default/account/auth') 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 - #%] - -[%# 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: [% info.errstr FILTER html %]. - [% 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: [% auth_err_tag FILTER html %] - -[% 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 %] [ Forgot my Password ] [% END %] 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 %]

@@ -111,10 +108,7 @@

[% END %] - [%# For now, password change requests only apply to the DB - # verification method #%] - - [% IF has_db != 0 %] + [% IF user.authorizer.can_change_password %]
@@ -126,10 +120,6 @@ - [% END %] -
-[% END %] - [% PROCESS global/footer.html.tmpl %] -- cgit v1.2.3-24-g4f1b