Add a new form for specifying groups.
* Clarifies these come from LDAP, rather than the obsolete auth.conf
* Adds one or two lines, based on +PMC
* Continues "keep old ordering/format" for the output files.
diff --git a/gen.py b/gen.py
index da5049c..1c0c767 100755
--- a/gen.py
+++ b/gen.py
@@ -162,6 +162,22 @@
subdirs = [ line[10:] ]
for s in subdirs:
new_z.append(f'[{s}]\n* = r')
+ elif line.startswith('LDAP'):
+ # Define a group using LDAP information.
+ # Line format:
+ # LDAP(+PMC): $TLPNAME
+ ### NOTE: we place this authz at this specific point in
+ ### the authz file, and do "group" and "group-pmc" in this
+ ### order to maintain backwards-compat identical generation
+ ### of the file. In the future, simplification will be
+ ### possible once we decide to trust a major change in
+ ### the authz files.
+ group = line.split(':')[1].strip()
+ members = self.group_members(group)
+ new_z.append(f'{group}={",".join(members)}')
+ if line.startswith('LDAP+PMC'):
+ members = self.group_members(group + '-pmc')
+ new_z.append(f'{group}-pmc={",".join(members)}')
elif line.startswith('#') or '={' not in line:
new_z.append(line)
else: