You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2018/07/28 12:44:17 UTC
[whimsy] branch master updated: Show bad givenName count
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new aca7b58 Show bad givenName count
aca7b58 is described below
commit aca7b586619b8ff3596fd8075b32c814342458fc
Author: Sebb <se...@apache.org>
AuthorDate: Sat Jul 28 13:44:16 2018 +0100
Show bad givenName count
---
www/secretary/ldap-names.cgi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/www/secretary/ldap-names.cgi b/www/secretary/ldap-names.cgi
index 6ab25a7..8a51d95 100755
--- a/www/secretary/ldap-names.cgi
+++ b/www/secretary/ldap-names.cgi
@@ -33,6 +33,7 @@ _html do
# prefetch LDAP data
people = ASF::Person.preload(%w(uid cn sn givenName))
matches = 0
+ badGiven = 0
_table do
_tr do
@@ -45,6 +46,7 @@ _html do
people.sort_by(&:name).each do |p|
given = p.givenName rescue '---' # some entries have not set this up
givenOK = p.cn.include? given
+ badGiven += 1 unless givenOK
snOK = p.cn.include? p.sn
if givenOK and snOK
matches += 1
@@ -76,6 +78,6 @@ _html do
end
_p do
- _ "Total: #{people.size} Matches: #{matches}"
+ _ "Total: #{people.size} Matches: #{matches} GivenBad: #{badGiven}"
end
end
\ No newline at end of file