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 eb5d80d  Another recursion
eb5d80d is described below

commit eb5d80d8f8d58d2229c3b9d97e17acb59918f7e9
Author: Sebb <[email protected]>
AuthorDate: Mon Jan 13 09:48:16 2020 +0000

    Another recursion
---
 lib/whimsy/asf/ldap.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 8b8d7f1..23d3944 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1165,7 +1165,8 @@ module ASF
         ASF.search_one(base, "cn=#{name}", 'member').flatten
       end
 
-      members.map {|uid| Person.find uid[/uid=(.*?),/,1]}
+      # avoid recursive call to this method
+      @members.map {|uid| Person.find uid[/uid=(.*?),/,1]}
     end
 
     # list of member ids in the project
@@ -1183,6 +1184,7 @@ module ASF
         ASF.search_one(base, "cn=#{name}", 'owner').flatten
       end
 
+      # avoid recursive call to this method
       @owners.map {|uid| Person.find uid[/uid=(.*?),/,1]}
     end
 
@@ -1389,6 +1391,7 @@ module ASF
         ASF.search_one(base, "cn=#{name}", 'member').flatten
       end
 
+      # avoid recursive call to this method
       @members.map {|uid| Person.find uid[/uid=(.*?),/,1]}
     end
 

Reply via email to