You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2017/08/23 17:26:15 UTC

svn commit: r1805940 - /comdev/reporter.apache.org/trunk/site/getjson.py

Author: sebb
Date: Wed Aug 23 17:26:15 2017
New Revision: 1805940

URL: http://svn.apache.org/viewvc?rev=1805940&view=rev
Log:
Use ldap_projects in preference to groups

Modified:
    comdev/reporter.apache.org/trunk/site/getjson.py

Modified: comdev/reporter.apache.org/trunk/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson.py?rev=1805940&r1=1805939&r2=1805940&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Wed Aug 23 17:26:15 2017
@@ -19,7 +19,7 @@
         data/mailinglists.json
         data/maildata_extended.json
         https://whimsy.apache.org/public/member-info.json
-        https://whimsy.apache.org/public/public_ldap_committees.json
+        https://whimsy.apache.org/public/public_ldap_projects.json
         
     
     Environment variables:
@@ -42,7 +42,7 @@ uc = UrlCache(interval=60, silent=True)
 RAOHOME = '../'
 
 MEMBER_INFO = 'https://whimsy.apache.org/public/member-info.json'
-COMMITTEES = 'https://whimsy.apache.org/public/public_ldap_committees.json'
+PROJECTS = 'https://whimsy.apache.org/public/public_ldap_projects.json'
 
 # Pick up environment settings
 form = cgi.FieldStorage();
@@ -95,15 +95,15 @@ def loadJson(url):
     resp.close()
     return j
 
-committees = loadJson(COMMITTEES)['committees']
+projects = loadJson(PROJECTS)['projects']
 members = loadJson(MEMBER_INFO)['members']
 
 def getPMCs(uid):
     """Returns the array of LDAP committee groups to which the uid belongs. Excludes incubator"""
     groups = []
-    for group in committees:
-        if group != "incubator":
-            if uid in committees[group]['roster']:
+    for group in projects:
+        if group != "incubator" and 'pmc' in projects[group]:
+            if uid in projects[group]['owners']:
                 groups.append(group)
     return groups