You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sebastian Bazley <se...@apache.org> on 2016/03/23 02:35:17 UTC

[whimsy.git] [1/1] Commit b607980: Prepare for the pit

Commit b6079802e80e562c6ae72d9e7b5f20ae1d5aba2b:
    Prepare for the pit


Branch: refs/heads/master
Author: Sebb <se...@apache.org>
Committer: Sebb <se...@apache.org>
Pusher: sebb <se...@apache.org>

------------------------------------------------------------
www/roster/public_nonldap_groups.rb                          | +++++++++++++++ 
------------------------------------------------------------
15 changes: 15 additions, 0 deletions.
------------------------------------------------------------


diff --git a/www/roster/public_nonldap_groups.rb b/www/roster/public_nonldap_groups.rb
index 9f6d223..b0f77e4 100644
--- a/www/roster/public_nonldap_groups.rb
+++ b/www/roster/public_nonldap_groups.rb
@@ -37,7 +37,22 @@
   groups[grp][:podling] = pods[grp] if pods[grp]
 end
 
+pitgroups = {}
+
+# find the locally defined groups
+ASF::Authorization.new('pit').each do |grp, mem|
+  pitgroups[grp] = {
+      # we use same syntax as for normal groups
+      # this will allow future expansion e.g. if we can flag podlings somehow
+      roster: mem.sort.uniq
+      }
+  # add podling type entry if there is one
+  pitgroups[grp][:podling] = pods[grp] if pods[grp]
+end
+
 public_json_output(
   # There does not seem to be a useful timestamp here
   groups: groups,
+  # TODO decide how to present the data: separate key or attribute or file
+  #pitgroups: pitgroups
 )