aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2013-07-15 01:49:38 +0200
committerNicolas Vigier <boklm@mars-attacks.org>2013-07-15 01:49:38 +0200
commitbe3231831481aa3f518dc7c57c11f039811d6b18 (patch)
tree524c0af4b1585479b27fd898a8141c10a8772ee5
parent89dc6b406d27582b4bcc806cc0b02e2fac4c329d (diff)
downloadmgagit-be3231831481aa3f518dc7c57c11f039811d6b18.tar
mgagit-be3231831481aa3f518dc7c57c11f039811d6b18.tar.gz
mgagit-be3231831481aa3f518dc7c57c11f039811d6b18.tar.bz2
mgagit-be3231831481aa3f518dc7c57c11f039811d6b18.tar.xz
mgagit-be3231831481aa3f518dc7c57c11f039811d6b18.zip
load_users: keep all user infos from ldap
Keep all user infos fetched from ldap (not only ssh key), so that they can be used in gitolite configuration.
-rw-r--r--lib/MGA/Git.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MGA/Git.pm b/lib/MGA/Git.pm
index f6b9b7f..e051bb9 100644
--- a/lib/MGA/Git.pm
+++ b/lib/MGA/Git.pm
@@ -94,7 +94,7 @@ sub load_users {
filter => $config->{userfilter},
);
my @users = grep { $_->{sshpublickey} } values %{$m->as_struct};
- @{$r->{users}}{map { $_->{uid}[0] } @users} = map { $_->{sshpublickey} } @users;
+ @{$r->{users}}{map { $_->{uid}[0] } @users} = @users;
}
sub get_tmpl {
@@ -155,7 +155,7 @@ sub update_gitolite_keydir {
my %users_new;
foreach my $u (keys %{$r->{users}}) {
my $i = 0;
- foreach my $key (@{$r->{users}{$u}}) {
+ foreach my $key (@{$r->{users}{$u}{sshpublickey}}) {
next unless $key;
$users_new{"$u\@$i.pub"} = $key;
$i++;