whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Bazley <s...@apache.org>
Subject [whimsy.git] [2/2] Commit 01b3dbd: Split non-committers into login/nologin groups
Date Sat, 23 Jan 2016 12:53:00 GMT
Commit 01b3dbdfb874764fd81319c65bcfeb71b73273d9:
    Split non-committers into login/nologin groups


Branch: refs/heads/master
Author: Sebb <sebb@apache.org>
Committer: Sebb <sebb@apache.org>
Pusher: sebb <sebb@apache.org>

------------------------------------------------------------
www/roster/public_ldap_committers.rb                         | +++++++++++++ --
------------------------------------------------------------
15 changes: 13 additions, 2 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_ldap_committers.rb b/www/roster/public_ldap_committers.rb
index 9463b21..9b2db0b 100644
--- a/www/roster/public_ldap_committers.rb
+++ b/www/roster/public_ldap_committers.rb
@@ -11,7 +11,11 @@
 #     "uid": "Public Name",
 #     ...
 #   },
-#   "non_committers": { // entries in 'ou=people,dc=apache,dc=org' who are not committers
+#   "non_committers": { // entries in 'ou=people,dc=apache,dc=org' who are not committers
but who can login
+#     "uid": "Public Name",
+#     ...
+#   },
+#   "non_committers_nologin": { // entries in 'ou=people,dc=apache,dc=org' who are not committers
and have invalid shells
 #     "uid": "Public Name",
 #     ...
 # }
@@ -32,6 +36,8 @@
 ban = {}
 # people entries that are not committers (and not in nologin)
 non = {}
+# people entries that are not committers (in nologin)
+nonb = {}
 
 peeps = ASF::Person.preload('loginShell',{}) # needed for the banned? method
 
@@ -46,7 +52,11 @@
 peeps.sort_by {|a| a.name}.each do |e|
   if ASF.committers.include? e
   else
-      non[e.name] = e.public_name
+     if e.banned?
+         nonb[e.name] = e.public_name
+     else
+         non[e.name] = e.public_name
+     end
   end
 end
 
@@ -56,6 +66,7 @@
   committers: ids,
   committers_nologin: ban,
   non_committers: non,
+  non_committers_nologin: nonb,
 }
 
 # format as JSON

Mime
View raw message