whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: Add whimsy to the list of PMCs using ou=project
Date Thu, 22 Jun 2017 17:18:37 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys 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 f19ae4b  Add whimsy to the list of PMCs using ou=project
f19ae4b is described below

commit f19ae4b53ae5c08e5219e9ec5638c4075331a7fe
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Thu Jun 22 13:17:56 2017 -0400

    Add whimsy to the list of PMCs using ou=project
---
 lib/whimsy/asf/ldap.rb | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index 0095235..afe1350 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -958,11 +958,14 @@ module ASF
       members.map {|uid| Person.find uid[/uid=(.*?),/,1]}
     end
 
+    # temp list of projects that have moved over to new project LDAP schema
+    GUINEAPIGS = %w(incubator whimsy)
+
     # List of owners for this committee, i.e. people who are members of the
     # committee and have update access.  Data is obtained from LDAP.
     def owners
-      if name == 'incubator'
-        ASF::Project.find('incubator').owners
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).owners
       else
         members
       end
@@ -971,8 +974,8 @@ module ASF
     # List of committers for this committee.  Data is obtained from LDAP.  This
     # data is generally stored in an attribute named <tt>member</tt>.
     def committers
-      if name == 'incubator'
-        ASF::Project.find('incubator').members
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).members
       else
         ASF::Group.find(name).members
       end
@@ -980,8 +983,8 @@ module ASF
 
     # remove people as owners of a project in LDAP
     def remove_owners(people)
-      if name == 'incubator'
-        ASF::Project.find('incubator').remove_owners(people)
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).remove_owners(people)
       else
         remove(people)
       end
@@ -989,8 +992,8 @@ module ASF
 
     # remove people as members of a project in LDAP
     def remove_committers(people)
-      if name == 'incubator'
-        ASF::Project.find('incubator').remove_members(people)
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).remove_members(people)
       else
         ASF::Group.find(name).remove(people)
       end
@@ -998,8 +1001,8 @@ module ASF
 
     # add people as owners of a project in LDAP
     def add_owners(people)
-      if name == 'incubator'
-        ASF::Project.find('incubator').add_owners(people)
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).add_owners(people)
       else
         add(people)
       end
@@ -1008,8 +1011,8 @@ module ASF
     # add people as committers of a project.  This information is stored
     # in LDAP using a <tt>members</tt> attribute.
     def add_committers(people)
-      if name == 'incubator'
-        ASF::Project.find('incubator').add_members(people)
+      if GUINEAPIGS.include? name
+        ASF::Project.find(name).add_members(people)
       else
         ASF::Group.find(name).add(people)
       end

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message