You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/02/15 13:52:15 UTC
[whimsy.git] [1/1] Commit 991318f: Add urls (if present)
Commit 991318f83d27429aad1892efdc04b508de6e1279:
Add urls (if present)
Add about 10% to the file size, but is needed for phonebook
Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>
------------------------------------------------------------
www/roster/public_ldap_people.rb | ++++++ -
------------------------------------------------------------
7 changes: 6 additions, 1 deletions.
------------------------------------------------------------
diff --git a/www/roster/public_ldap_people.rb b/www/roster/public_ldap_people.rb
index 1e98cd9..4020d41 100644
--- a/www/roster/public_ldap_people.rb
+++ b/www/roster/public_ldap_people.rb
@@ -19,7 +19,7 @@
# ASF people
peo = {}
-peeps = ASF::Person.preload(['cn', 'loginShell']) # for performance
+peeps = ASF::Person.preload(['cn', 'loginShell', ['asf-personalURL']]) # for performance
if peeps.empty?
Wunderbar.error "No results retrieved, output not created"
@@ -33,6 +33,11 @@ def makeEntry(hash, e)
}
if e.banned?
hash[e.id][:noLogin] = true
+ else
+ # Don't publish urls for banned logins
+ if not e.urls.empty?
+ hash[e.id][:urls] = e.urls
+ end
end
end