Tweaked the greate_group_wikis management command to accept trailing fileglob wildcards on adhoc wiki group acronyms. Added a generic NomCom wiki to the list of adhoc wikis to be created and maintained, with admins from active nomcom* groups.
- Legacy-Id: 16176
This commit is contained in:
parent
8d9c601118
commit
7b93709a3b
|
@ -935,8 +935,10 @@ TRAC_SVN_DIR_PATTERN = "/a/svn/group/%s"
|
|||
TRAC_CREATE_GROUP_STATES = ['bof', 'active', ]
|
||||
TRAC_CREATE_GROUP_ACRONYMS = ['iesg', 'iaoc', 'ietf', ]
|
||||
TRAC_CREATE_ADHOC_WIKIS = [
|
||||
# admin group, name, sub-path
|
||||
# admin group acronym, name, sub-path
|
||||
# A trailing fileglob wildcard is supported on group acronyms
|
||||
('iesg', 'Meeting', "ietf/meeting"),
|
||||
('nomcom*', 'NomCom', 'nomcom'),
|
||||
]
|
||||
|
||||
SVN_PACKAGES = [
|
||||
|
|
|
@ -232,9 +232,9 @@ class Command(BaseCommand):
|
|||
|
||||
def update_trac_permissions(self, name, group, env):
|
||||
if self.dummy_run:
|
||||
self.note("Would update Trac permissions for '%s'" % name)
|
||||
self.note("Would update Trac permissions for '%s' from group %s" % (name, group.acronym))
|
||||
else:
|
||||
self.note("Updating Trac permissions for '%s'" % name)
|
||||
self.note("Updating Trac permissions for '%s' from group %s" % (name, group.acronym))
|
||||
mgr = PermissionSystem(env)
|
||||
permission_list = mgr.get_all_permissions()
|
||||
permission_list = [ (u,a) for (u,a) in permission_list if not u in ['anonymous', 'authenticated']]
|
||||
|
@ -392,8 +392,13 @@ class Command(BaseCommand):
|
|||
if not trac_env and not self.dummy_run:
|
||||
continue
|
||||
|
||||
group = Group.objects.get(acronym=acronym)
|
||||
self.update_trac_permissions(name, group, trac_env)
|
||||
if acronym.endswith('*'):
|
||||
groups = Group.objects.filter(acronym__startswith=acronym[:-1], state_id='active')
|
||||
for group in groups:
|
||||
self.update_trac_permissions(name, group, trac_env)
|
||||
else:
|
||||
group = Group.objects.get(acronym=acronym)
|
||||
self.update_trac_permissions(name, group, trac_env)
|
||||
|
||||
except Exception as e:
|
||||
self.errors.append(e)
|
||||
|
|
Loading…
Reference in a new issue