summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2015-08-06 16:48:13 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2015-08-06 16:48:13 +0200
commitbaed5713d175eee3fe2aed9ee3afef916b4641d4 (patch)
tree019396be8893996a1ec6f3ae44af776143c9b9f2 /Bugzilla
parent5d46fc8d19dfdc7ede2effb14d8067d0d3c6a2d1 (diff)
downloadbugzilla-baed5713d175eee3fe2aed9ee3afef916b4641d4.tar.gz
bugzilla-baed5713d175eee3fe2aed9ee3afef916b4641d4.tar.xz
Bug 1179160: The login form should not use type="email" when LDAP has LDAPmailattribute set
r=gerv a=dkl
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 6665029f4..ef45cb313 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -1151,6 +1151,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