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 f05bf533 Hack to fix missing LDAP group
f05bf533 is described below

commit f05bf533255bacdc9f1aa0082bdab30828965b6f
Author: Sebb <[email protected]>
AuthorDate: Fri Apr 28 14:53:56 2023 +0100

    Hack to fix missing LDAP group
---
 www/index.html             | 1 -
 www/roster/models/group.rb | 6 +++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/www/index.html b/www/index.html
index fb6758f8..fdde6e5d 100644
--- a/www/index.html
+++ b/www/index.html
@@ -135,7 +135,6 @@
             <div class="panel-body">
               <ul>
                 <li><a href="roster/committer/__self__">Your personal 
details</a></li>
-                <li><b>Sorry, but the Rosters and Groups links below may not 
work at present; solution being sought</b></li>
                 <li><a href="roster/">Rosters</a>
                   including:
                   <a href="roster/committee/">PMCs</a>
diff --git a/www/roster/models/group.rb b/www/roster/models/group.rb
index 8f5e21c9..dd13e27c 100644
--- a/www/roster/models/group.rb
+++ b/www/roster/models/group.rb
@@ -23,7 +23,11 @@ class Group
     groups += ASF::AuthGroup.listcns.map {|group| [group, "LDAP Auth Group"]}
 
     # add app groups
-    groups += ASF::AppGroup.listcns.map {|app| [app, "LDAP app group"]}
+    begin # HACK to bypass missing LDAP ou=apps group
+      groups += ASF::AppGroup.listcns.map {|app| [app, "LDAP app group"]}
+    rescue LDAP::ResultError => e
+      Wunderbar.warn "Ignoring LDAP error: #{e.inspect}"
+    end
 
     groups.sort
   end

Reply via email to