whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Flag mismatched CN and public name
Date Fri, 18 Jun 2021 14:51:29 GMT
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 fe98a15  Flag mismatched CN and public name
fe98a15 is described below

commit fe98a15b0fb893ae89d9e70d0f6b35eab7407525
Author: Sebb <sebb@apache.org>
AuthorDate: Fri Jun 18 15:51:20 2021 +0100

    Flag mismatched CN and public name
---
 www/secretary/ldap-names.cgi | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/www/secretary/ldap-names.cgi b/www/secretary/ldap-names.cgi
index 3c09e15..e8e5bf4 100755
--- a/www/secretary/ldap-names.cgi
+++ b/www/secretary/ldap-names.cgi
@@ -65,7 +65,7 @@ _html do
   _h1 'LDAP people name checks'
 
   _p do
-    _ 'LDAP sn and givenName must match the result of ASF::Person.ldap_name'
+    _ 'LDAP sn and givenName must match the result of ASF::Person.ldap_name; cn should match
Public Name'
     _br
     _ 'The table below show the differences, if any.'
     _br
@@ -124,6 +124,7 @@ _html do
       new_given = parse['givenName']
       new_sn = parse['sn']
       unused = parse['unused']
+      _initials = parse['initials']
 
       givenOK = (new_given == given)
       badGiven += 1 unless givenOK
@@ -131,17 +132,19 @@ _html do
       snOK =    (new_sn == p.sn)
       badSN += 1 unless snOK
 
-      if givenOK and snOK # all checks OK
+      icla = ASF::ICLA.find_by_id(p.uid)
+      public_name = icla.name rescue '?'
+      cnOK = (public_name == p.cn or public_name == '?') # don't check cn against missing
public name
+
+      if givenOK and snOK and cnOK # all checks OK
         matches += 1
         next
       end
       next if givenOK and skipSN #and unused.size == 0
 
-      icla = ASF::ICLA.find_by_id(p.uid)
       claRef = icla.claRef if icla
       claRef ||= 'unknown'
       legal_name = icla.legal_name rescue '?'
-      public_name = icla.name rescue '?'
       _tr do
         _td do
           _a p.uid, href: '/roster/committer/' + p.uid

Mime
View raw message