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 2021/06/14 11:21:20 UTC
[whimsy] branch master updated: Add some more checks
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 e256e83 Add some more checks
e256e83 is described below
commit e256e834d90bed97bac78dea96e36549a0238564
Author: Sebb <se...@apache.org>
AuthorDate: Mon Jun 14 12:21:10 2021 +0100
Add some more checks
---
www/secretary/ldap-check.cgi | 59 +++++++++++++++++++++++++++++++++++++++++---
1 file changed, 56 insertions(+), 3 deletions(-)
diff --git a/www/secretary/ldap-check.cgi b/www/secretary/ldap-check.cgi
index 261de4a..99c483d 100755
--- a/www/secretary/ldap-check.cgi
+++ b/www/secretary/ldap-check.cgi
@@ -61,6 +61,9 @@ _html do
_ 'The table below show the differences, if any'
end
+ projects = ASF::Project.preload # for performance
+ pmcs = ASF::Committee.pmcs
+
_table do
_tr do
_th 'Project'
@@ -70,9 +73,6 @@ _html do
_th 'in project (owner or member) but not in committers group'
end
- projects = ASF::Project.preload # for performance
- pmcs = ASF::Committee.pmcs
-
projects.keys.sort_by(&:name).each do |p|
po=p.ownerids
pm=p.memberids
@@ -176,6 +176,59 @@ _html do
_p 'All LDAP people entries are committers'
end
+ _h2 'People who are banned or have nologin but are still committers'
+
+ people_projects=Hash.new{|h,k| h[k]=Array.new}
+
+ projects.keys.each do |prj|
+ prj.members.each do |m|
+ people_projects[m] << prj.name
+ end
+ prj.owners.each do |m|
+ people_projects[m] << prj.name+'-(p)pmc'
+ end
+ end
+
+ _table do
+ _tr do
+ _th 'UID'
+ _th 'Created'
+ _th 'asf-banned?'
+ _th 'Login'
+ _th 'Projects (if any)'
+ end
+ people.select {|p| p.inactive? and new.include? p.name}.sort_by(&:name).each do |p|
+ _tr do
+ _td do
+ _a p.name, href: '/roster/committer/' + p.name
+ end
+ _td p.createDate
+ _td p.asf_banned?
+ _td p.loginShell
+ _td people_projects[p.name].join(',')
+ end
+ end
+ end
+
+ _h2 'People who have nologin set but are not banned'
+
+ _table do
+ _tr do
+ _th 'UID'
+ _th 'Created'
+ _th 'Login'
+ end
+ people.select {|p| p.inactive? and not p.asf_banned?}.sort_by(&:name).each do |p|
+ _tr do
+ _td do
+ _a p.name, href: '/roster/committer/' + p.name
+ end
+ _td p.createDate
+ _td p.loginShell
+ end
+ end
+ end
+
_h2 'committers who are not in LDAP people'
# which committers are not people?