aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-08-06 16:52:59 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-06 16:52:59 +0200
commita2ae154592af0131e13f935802839679e4e88924 (patch)
treebe503bd90904d759dc0c2698badb1550efd95a6d /Bugzilla/Template.pm
parentae716b289708e3b57943d18a5a9169cdaaf4993d (diff)
downloadbugs-a2ae154592af0131e13f935802839679e4e88924.tar
bugs-a2ae154592af0131e13f935802839679e4e88924.tar.gz
bugs-a2ae154592af0131e13f935802839679e4e88924.tar.bz2
bugs-a2ae154592af0131e13f935802839679e4e88924.tar.xz
bugs-a2ae154592af0131e13f935802839679e4e88924.zip
Bug 1179160: The login form should not use type="email" when LDAP has LDAPmailattribute set
r=gerv a=dkl
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 6ac36f783..80f091f8c 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -1158,6 +1158,17 @@ sub create {
return \@optional;
},
'default_authorizer' => sub { return Bugzilla::Auth->new() },
+
+ 'login_not_email' => sub {
+ my $params = Bugzilla->params;
+ my $cache = Bugzilla->request_cache;
+
+ return $cache->{login_not_email} //=
+ ($params->{emailsuffix}
+ || ($params->{user_verify_class} =~ /LDAP/ && $params->{LDAPmailattribute})
+ || ($params->{user_verify_class} =~ /RADIUS/ && $params->{RADIUS_email_suffix}))
+ ? 1 : 0;
+ },
},
};
# Use a per-process provider to cache compiled templates in memory across