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 ba04ec2  Reuse code: only set up :owners in one method
ba04ec2 is described below

commit ba04ec21f1e7e5295ef483eb483f6b6336cfdef1
Author: Sebb <[email protected]>
AuthorDate: Sat Jan 18 12:39:11 2020 +0000

    Reuse code: only set up :owners in one method
---
 lib/whimsy/asf/ldap.rb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index d537bcc..236aa8c 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -1181,11 +1181,7 @@ module ASF
     # list of owners on this project.  Stored in LDAP as a <tt>owners</tt>
     # attribute.
     def owners
-      owners = weakref(:owners) do
-        ASF.search_one(base, "cn=#{name}", 'owner').flatten
-      end
-
-      owners.map {|uid| Person.find uid[/uid=(.*?),/,1]}
+      ownerids.map {|id| Person.find id}
     end
 
     # list of owner ids in the project

Reply via email to