diff options
author | Frédéric Buclin <LpSolit@gmail.com> | 2015-08-06 16:52:59 +0200 |
---|---|---|
committer | Frédéric Buclin <LpSolit@gmail.com> | 2015-08-06 16:52:59 +0200 |
commit | a2ae154592af0131e13f935802839679e4e88924 (patch) | |
tree | be503bd90904d759dc0c2698badb1550efd95a6d /Bugzilla/Template.pm | |
parent | ae716b289708e3b57943d18a5a9169cdaaf4993d (diff) | |
download | bugs-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.pm | 11 |
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 |