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 d4a6d7e More detailed check of missing committers
d4a6d7e is described below
commit d4a6d7e3c535d43e5237b4bc934c3d1ef9638253
Author: Sebb <[email protected]>
AuthorDate: Fri Mar 8 00:42:12 2019 +0000
More detailed check of missing committers
---
www/index.html | 1 +
www/secretary/ldap-check-committers.cgi | 76 +++++++++++++++++++++++++++++++++
2 files changed, 77 insertions(+)
diff --git a/www/index.html b/www/index.html
index 2538132..039f6dd 100644
--- a/www/index.html
+++ b/www/index.html
@@ -184,6 +184,7 @@
<li><a href="secretary/workbench/">Secretary Workbench</a></li>
<li><a href="secretary/icla-lint">Lint test for
iclas.txt</a></li>
<li><a href="secretary/ldap-check">LDAP members and owners
checks (may take a while to respond)</a></li>
+ <li><a href="secretary/ldap-check-committers">Detailed LDAP
missing committer check; shows subs and mods if any (may take a while to
respond)</a></li>
<li><a href="secretary/memapp_check">Check members.txt against
members_apps</a></li>
<li><a href="secretary/public-names">Public names: LDAP vs
icla.txt</a></li>
<li><a href="secretary/ldap-names">LDAP name check: compare
cn, sn, givenName</a></li>
diff --git a/www/secretary/ldap-check-committers.cgi
b/www/secretary/ldap-check-committers.cgi
new file mode 100755
index 0000000..19513e8
--- /dev/null
+++ b/www/secretary/ldap-check-committers.cgi
@@ -0,0 +1,76 @@
+#!/usr/bin/env ruby
+
+=begin
+
+LDAP people whould be committers (unless login is disabled)
+
+=end
+
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+
+require 'whimsy/asf'
+require 'whimsy/asf/mlist'
+require 'wunderbar'
+
+_html do
+ _style %{
+ table {border-collapse: collapse}
+ table, th, td {border: 1px solid black}
+ td {padding: 3px 6px}
+ tr:hover td {background-color: #FF8}
+ th {background-color: #a0ddf0}
+ }
+
+ _h1 'LDAP membership checks'
+
+ old = ASF::Group['committers'].memberids
+ people = ASF::Person.preload(%w(uid createTimestamp asf-banned asf-altEmail
mail loginShell))
+
+ _h2 'people who are not committers (excluding nologin)'
+
+ non_committers = people.reject { |p| p.nologin? or old.include? p.name or
p.name == 'apldaptest'}
+ if non_committers.length > 0
+ _table do
+ _tr do
+ _th 'UID'
+ _th 'asf-banned?'
+ _th 'Date'
+ _th 'ICLA'
+ _th 'Subscriptions'
+ _th 'Moderates'
+ end
+ non_committers.sort_by(&:name).each do |p|
+ icla = ASF::ICLA.find_by_id(p.name)
+ _tr do
+ _td do
+ _a p.name, href: '/roster/committer/' + p.name
+ end
+ _td p.asf_banned?
+ _td p.createDate
+ if icla
+ if icla.claRef
+ _td do
+ _a icla.claRef, href:
"https://svn.apache.org/repos/private/documents/iclas/#{icla.claRef}"
+ end
+ else
+ _td icla.form
+ end
+ else
+ _td 'No ICLA entry found'
+ end
+ all_mail = p.all_mail
+ _td do
+ # keep only the list names
+ _ ASF::MLIST.subscriptions(all_mail)[:subscriptions].map{|x| x[0]}
+ end
+ _td do
+ _ ASF::MLIST.moderates(all_mail)[:moderates]
+ end
+ end
+ end
+ end
+ else
+ _p 'All LDAP people entries are committers'
+ end
+
+end
\ No newline at end of file