From 42c3cbfc51b281db155d159d4871000000707051 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 1 Jun 2013 11:49:14 +0200 Subject: [PATCH] ud-generate: Support writing gitolite config for just one user-group --- debian/changelog | 2 +- ud-generate | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 61579ac..7214594 100644 --- a/debian/changelog +++ b/debian/changelog @@ -57,6 +57,7 @@ userdir-ldap (0.3.80) UNRELEASED; urgency=low End with 'by * none'. * ud-generate: Allow more than one email address in userForward. Quite useful for role accounts. + * ud-generate: Support writing gitolite config for just one user-group. [ Stephen Gran ] * Fix deprecation warnings for sha module by using hashlib module instead @@ -75,7 +76,6 @@ userdir-ldap (0.3.80) UNRELEASED; urgency=low - add mailPreserveSuffixSeperator - add voipPasswords - -- Peter Palfrader Mon, 14 May 2012 18:45:07 +0200 userdir-ldap (0.3.79) unstable; urgency=low diff --git a/ud-generate b/ud-generate index 6a2fcdd..6e857b9 100755 --- a/ud-generate +++ b/ud-generate @@ -1260,6 +1260,12 @@ def generate_host(host, global_dir, all_accounts, ssh_userkeys): if 'GITOLITE' in ExtraList: DoLink(global_dir, OutDir, "ssh-gitolite") + if 'exportOptions' in host[1]: + for entry in host[1]['exportOptions']: + v = entry.split('=',1) + if v[0] != 'GITOLITE' or len(v) != 2: continue + gitolite_accounts = filter(lambda x: IsInGroup(x, [v[1]], current_host), all_accounts) + GenSSHGitolite(gitolite_accounts, OutDir + "ssh-gitolite-%s"%(v[1],)) if 'WEB-PASSWORDS' in ExtraList: DoLink(global_dir, OutDir, "web-passwords") -- 2.20.1