aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@netscape.net>2017-10-15 14:41:44 +0200
committerFrédéric Buclin <LpSolit@netscape.net>2017-10-15 14:41:44 +0200
commit7c65990927b3ededebdcd05d3ca71800a7a2458b (patch)
tree91640f269c5a4804fc1e5229574e956bccfe68a2
parent2c7b0be3f882ec09dc5b2fda71a90efe4761ac54 (diff)
downloadbugs-7c65990927b3ededebdcd05d3ca71800a7a2458b.tar
bugs-7c65990927b3ededebdcd05d3ca71800a7a2458b.tar.gz
bugs-7c65990927b3ededebdcd05d3ca71800a7a2458b.tar.bz2
bugs-7c65990927b3ededebdcd05d3ca71800a7a2458b.tar.xz
bugs-7c65990927b3ededebdcd05d3ca71800a7a2458b.zip
Display the external ID in editusers.cgi (used by LDAP)
-rw-r--r--Bugzilla/Auth/Verify/LDAP.pm1
-rwxr-xr-xeditusers.cgi4
-rw-r--r--template/en/default/admin/users/list.html.tmpl3
-rw-r--r--template/en/default/admin/users/search.html.tmpl1
-rw-r--r--template/en/default/admin/users/userdata.html.tmpl4
5 files changed, 10 insertions, 3 deletions
diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/Verify/LDAP.pm
index 9687363d6..3063a19a9 100644
--- a/Bugzilla/Auth/Verify/LDAP.pm
+++ b/Bugzilla/Auth/Verify/LDAP.pm
@@ -26,6 +26,7 @@ use Net::LDAP::Util qw(escape_filter_value);
use constant admin_can_create_account => 0;
use constant user_can_create_account => 0;
+use constant extern_id_used => 1;
sub check_credentials {
my ($self, $params) = @_;
diff --git a/editusers.cgi b/editusers.cgi
index 37665b12d..5dea7c8a0 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -72,7 +72,7 @@ if ($action eq 'search') {
my $grouprestrict = $cgi->param('grouprestrict') || '0';
# 0 = disabled only, 1 = enabled only, 2 = everyone
my $is_enabled = $cgi->param('is_enabled') // 2;
- my $query = 'SELECT DISTINCT userid, login_name, realname, is_enabled, ' .
+ my $query = 'SELECT DISTINCT userid, login_name, realname, extern_id, is_enabled, ' .
$dbh->sql_date_format('last_seen_date', '%Y-%m-%d') . ' AS last_seen_date ' .
'FROM profiles';
my @bindValues;
@@ -129,6 +129,8 @@ if ($action eq 'search') {
$expr = "profiles.userid";
} elsif ($matchvalue eq 'realname') {
$expr = "profiles.realname";
+ } elsif ($matchvalue eq 'extern_id') {
+ $expr = "profiles.extern_id";
} else {
$expr = "profiles.login_name";
}
diff --git a/template/en/default/admin/users/list.html.tmpl b/template/en/default/admin/users/list.html.tmpl
index f90996882..0b3c46eef 100644
--- a/template/en/default/admin/users/list.html.tmpl
+++ b/template/en/default/admin/users/list.html.tmpl
@@ -35,6 +35,9 @@
{name => 'realname'
heading => 'Real name'
}
+ {name => 'extern_id'
+ heading => 'External ID'
+ }
{name => 'last_seen_date'
heading => 'Last Login'
}
diff --git a/template/en/default/admin/users/search.html.tmpl b/template/en/default/admin/users/search.html.tmpl
index 17477a012..bab4338ae 100644
--- a/template/en/default/admin/users/search.html.tmpl
+++ b/template/en/default/admin/users/search.html.tmpl
@@ -32,6 +32,7 @@
<option value="login_name">login name</option>
<option value="realname">real name</option>
<option value="userid">user id</option>
+ <option value="extern_id">external id</option>
</select>
<label for="matchstr">matching</label>
<input size="32" name="matchstr" id="matchstr" autofocus>
diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl
index c08cd0018..705168380 100644
--- a/template/en/default/admin/users/userdata.html.tmpl
+++ b/template/en/default/admin/users/userdata.html.tmpl
@@ -65,7 +65,6 @@
# if we ever have a login system that can create accounts through
# createaccount.cgi but can't change passwords.
#%]
- [% password_complexity = Param('password_complexity') %]
[% IF editusers %]
[% IF user.authorizer.can_change_password %]
<tr>
@@ -73,7 +72,8 @@
<td>
<input type="password" size="16" name="password" id="password"
value="" autocomplete="off" [% 'required' IF !editform %]>
- [% IF password_complexity == "mixed_letters" %]
+ [% password_complexity = Param('password_complexity') %]
+ [% IF password_complexity == "mixed_letters" %]
(Password must contain at least one UPPER and one lowercase letter.)
[% ELSIF password_complexity == "letters_numbers" %]
(Password must contain at least one UPPER and one lower case letter and a number.)