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 f95c56a  Show LDAP hosts for members
f95c56a is described below

commit f95c56af00e57ee51582b9a74961983b6dc85e6a
Author: Sebb <[email protected]>
AuthorDate: Wed Aug 4 13:30:02 2021 +0100

    Show LDAP hosts for members
---
 www/test.cgi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/www/test.cgi b/www/test.cgi
index bf61f37..275a874 100755
--- a/www/test.cgi
+++ b/www/test.cgi
@@ -18,6 +18,20 @@ def puts_system(*cmd)
   system(*cmd)
 end
 
+if ENV['SCRIPT_URL'] == '/members/test.cgi'
+  print "\n"
+  begin
+    $LOAD_PATH.unshift '/srv/whimsy/lib'
+    require 'whimsy/asf'
+    puts "LDAP.hosts:"
+    puts ASF::LDAP.hosts
+    puts "LDAP.rwhosts:"
+    puts ASF::LDAP.rwhosts
+  rescue Exception => e
+    p e
+  end
+end
+
 # Optional extra info (from the main script only)
 query = ENV['QUERY_STRING'] || ARGV[0]
 if query and not query.empty? and ENV['SCRIPT_URL'] == '/test.cgi'

Reply via email to