Commit 694aacfa0551d3c1b7ca2e70c7611abdc1851a0e:
Change syntax to be same as for other groups
Branch: refs/heads/master
Author: Sebb <[email protected]>
Committer: Sebb <[email protected]>
Pusher: sebb <[email protected]>
------------------------------------------------------------
www/roster/public_nonldap_groups.rb | +++++++ ----
------------------------------------------------------------
20 changes: 13 additions, 7 deletions.
------------------------------------------------------------
diff --git a/www/roster/public_nonldap_groups.rb
b/www/roster/public_nonldap_groups.rb
index d998641..2460147 100644
--- a/www/roster/public_nonldap_groups.rb
+++ b/www/roster/public_nonldap_groups.rb
@@ -10,12 +10,14 @@
# Output looks like:
# {
# "groups": {
-# "batchee": [
-# "uid",
-# ...
-# ]
-# },
-#
+# "batchee": {
+# "roster": [
+# "uid",
+# ...
+# ]
+# }
+# },
+# }
require_relative 'public_json_common'
@@ -32,7 +34,11 @@
# find the locally defined groups
body.scan(/^(\w[^=\s]*)[ \t]*=[ \t]*(\w.*)$/) do |grp, mem|
- groups[grp] = mem.gsub(/\s/,'').split(/,/).sort.uniq
+ groups[grp] = {
+ # we use same syntax as for normal groups
+ # this will allow future expansion e.g. if we can flag podlings somehow
+ roster: mem.gsub(/\s/,'').split(/,/).sort.uniq
+ }
end
public_json_output(