summaryrefslogtreecommitdiffstats
path: root/template/en/default/global
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/global
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/global')
-rw-r--r--template/en/default/global/code-error.html.tmpl52
-rw-r--r--template/en/default/global/useful-links.html.tmpl9
-rw-r--r--template/en/default/global/user-error.html.tmpl4
3 files changed, 51 insertions, 14 deletions
diff --git a/template/en/default/global/code-error.html.tmpl b/template/en/default/global/code-error.html.tmpl
index d9220f27b..1c15255af 100644
--- a/template/en/default/global/code-error.html.tmpl
+++ b/template/en/default/global/code-error.html.tmpl
@@ -48,15 +48,23 @@
Attachment #[% attach_id FILTER html %] ([% description FILTER html %])
is already obsolete.
- [% ELSIF error == "auth_err" %]
- [% title = "Internal Authentication Error" %]
- [%# Authentication errors are in a template depending on the auth method,
- for pluggability.
- #%]
- [% INCLUDE "account/auth/$authmethod-error.html.tmpl" %]
+ [% ELSIF error == "auth_invalid_email" %]
+ [% title = "Invalid Email Address" %]
+ We received an email address (<b>[% addr FILTER html %]</b>)
+ that didn't pass our syntax checking for a legal email address,
+ when trying to create or update your account.
+ [% IF default %]
+ A legal address must contain exactly one '@',
+ and at least one '.' after the @.
+ [% ELSE %]
+ [%+ Param('emailregexpdesc') %]
+ [% END %]
+ It must also not contain any of these special characters:
+ <tt>\ ( ) &amp; &lt; &gt; , ; : &quot; [ ]</tt>, or any whitespace.</tt>
[% ELSIF error == "authres_unhandled" %]
- An authorization handler return value was not handled by the login code.
+ The result value of [% value FILTER html %] was not handled by
+ the login code.
[% ELSIF error == "bad_page_cgi_id" %]
[% title = "Invalid Page ID" %]
@@ -103,10 +111,27 @@
[% ELSIF error == "cookies_need_value" %]
Every cookie must have a value.
+ [% ELSIF error == "env_no_email" %]
+ [% terms.Bugzilla %] did not receive an email address from the
+ environment.
+ [% IF Param("auth_env_email") %]
+ This means that the '[% Param("auth_env_email") FILTER html %]'
+ environment variable was empty or did not exist.
+ [% ELSE %]
+ You need to set the "auth_env_email" environment variable to
+ the name of the environment variable that will contain the
+ user's email address.
+ [% END %]
+
[% ELSIF error == "extension_invalid" %]
An error occured processing hook [% name FILTER html %] in
extension [% extension FILTER html %].
+ [% ELSIF error == "extern_id_conflict" %]
+ The external ID '[% extern_id FILTER html %]' already exists
+ in the database for '[% username FILTER html %]', but your
+ account source says that '[% extern_user FILTER html %]' has that ID.
+
[% ELSIF error == "field_type_mismatch" %]
Cannot seem to handle <code>[% field FILTER html %]</code>
and <code>[% type FILTER html %]</code> together.
@@ -247,6 +272,19 @@
given.
[% END %]
+ [% ELSIF error == "ldap_bind_failed" %]
+ Failed to bind to the LDAP server. The error message was:
+ <code>[% errstr FILTER html %]</code>
+
+ [% ELSIF error == "ldap_cannot_retreive_attr" %]
+ The specified LDAP attribute [% attr FILTER html %] was not found.
+
+ [% ELSIF error == "ldap_connect_failed" %]
+ Could not connect to the LDAP server <code>[% server FILTER html %]</code>.
+
+ [% ELSIF error == "ldap_server_not_defined" %]
+ The LDAP server for authentication has not been defined.
+
[% ELSIF error == "missing_bug_id" %]
No [% terms.bug %] ID was given.
diff --git a/template/en/default/global/useful-links.html.tmpl b/template/en/default/global/useful-links.html.tmpl
index b2e598163..3ac44d62a 100644
--- a/template/en/default/global/useful-links.html.tmpl
+++ b/template/en/default/global/useful-links.html.tmpl
@@ -57,7 +57,7 @@
[% IF user.login %]
[% ' | <a href="sanitycheck.cgi">Sanity&nbsp;check</a>'
IF user.groups.tweakparams %]
- [% IF user.get_flag('can_logout') %]
+ [% IF user.authorizer.can_logout %]
| <a href="relogin.cgi">Log&nbsp;out</a>&nbsp;
[% ELSE %]
| Logged&nbsp;in&nbsp;as&nbsp;
@@ -70,10 +70,13 @@
[% user.login FILTER html %]
[% END %]
[% ELSE %]
- [% IF Param('createemailregexp') %]
+ [% IF Param('createemailregexp')
+ && user.authorizer.user_can_create_account %]
| <a href="createaccount.cgi">New&nbsp;Account</a>
[% END %]
- | <a href="index.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
+ [% IF user.authorizer.can_login %]
+ | <a href="index.cgi?GoAheadAndLogIn=1">Log&nbsp;In</a>
+ [% END %]
[% END %]
</div>
</div>
diff --git a/template/en/default/global/user-error.html.tmpl b/template/en/default/global/user-error.html.tmpl
index e12bdf032..ee7f6c17d 100644
--- a/template/en/default/global/user-error.html.tmpl
+++ b/template/en/default/global/user-error.html.tmpl
@@ -1339,10 +1339,6 @@
[% title = "Wrong Token" %]
That token cannot be used to change your password.
- [% ELSIF error == "extern_id_conflict" %]
- [% title = "Extern ID Conflict" %]
- Someone with a different external ID has that address.
-
[% ELSIF error == "wrong_token_for_confirming_email_change" %]
[% title = "Wrong Token" %]
That token cannot be used to change your email address.