Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
a2ae1545
Commit
a2ae1545
authored
Aug 06, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1179160: The login form should not use type="email" when LDAP has LDAPmailattribute set
r=gerv a=dkl
parent
ae716b28
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
Template.pm
Bugzilla/Template.pm
+11
-0
login-small.html.tmpl
template/en/default/account/auth/login-small.html.tmpl
+2
-2
login.html.tmpl
template/en/default/account/auth/login.html.tmpl
+2
-2
No files found.
Bugzilla/Template.pm
View file @
a2ae1545
...
...
@@ -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
...
...
template/en/default/account/auth/login-small.html.tmpl
View file @
a2ae1545
...
...
@@ -34,7 +34,7 @@
id="mini_login[% qs_suffix FILTER html %]">
<input id="Bugzilla_login[% qs_suffix FILTER html %]" required
name="Bugzilla_login" class="bz_login"
[% IF
Param('emailsuffix')
%]
[% IF
login_not_email
%]
placeholder="Login"
[% ELSE %]
type="email" placeholder="Email Address"
...
...
@@ -64,7 +64,7 @@
class="mini_forgot bz_default_hidden">
<label for="login[% qs_suffix FILTER html %]">Login:</label>
<input name="loginname" size="20" id="login[% qs_suffix FILTER html %]" required
[% IF
Param('emailsuffix')
%]
[% IF
login_not_email
%]
placeholder="Your Login"
[% ELSE %]
type="email" placeholder="Your Email Address"
...
...
template/en/default/account/auth/login.html.tmpl
View file @
a2ae1545
...
...
@@ -30,7 +30,7 @@
<tr>
<th>
<label for="Bugzilla_login">
[% IF
Param('emailsuffix')
%]
[% IF
login_not_email
%]
Login:
[% ELSE %]
Your Email Address:
...
...
@@ -39,7 +39,7 @@
</th>
<td>
<input size="35" id="Bugzilla_login" name="Bugzilla_login"
[%- ' type="email"' UNLESS
Param('emailsuffix')
%] autofocus required>
[%- ' type="email"' UNLESS
login_not_email
%] autofocus required>
[% Param('emailsuffix') FILTER html %]
</td>
</tr>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment