aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config_default1
-rw-r--r--lib/MGA/Git.pm2
-rw-r--r--mgagit.conf1
3 files changed, 4 insertions, 0 deletions
diff --git a/config_default b/config_default
index 946ec81..1f9dc53 100644
--- a/config_default
+++ b/config_default
@@ -1,4 +1,5 @@
---
+use_ldap: no
ldapserver: ldap.mageia.org
binddn: uid=mgagit,ou=People,dc=mageia,dc=org
bindpwfile: /etc/mgagit.secret
diff --git a/lib/MGA/Git.pm b/lib/MGA/Git.pm
index 6f49833..b964c2b 100644
--- a/lib/MGA/Git.pm
+++ b/lib/MGA/Git.pm
@@ -67,6 +67,7 @@ sub re {
sub load_groups {
my ($r) = @_;
+ return unless $config->{use_ldap} eq 'yes';
my $ldap = get_ldap;
my $m = $ldap->search(
base => $config->{groupbase},
@@ -80,6 +81,7 @@ sub load_groups {
sub load_users {
my ($r) = @_;
+ return unless $config->{use_ldap} eq 'yes';
my $ldap = get_ldap;
my $m = $ldap->search(
base => $config->{userbase},
diff --git a/mgagit.conf b/mgagit.conf
index 08f10d1..0db3174 100644
--- a/mgagit.conf
+++ b/mgagit.conf
@@ -1,4 +1,5 @@
---
+use_ldap: no
gitolite_config: /var/lib/git/.gitolite/conf/gitolite.conf
pubkey_dir: /home/boklm/.gitolite/keydir
repos_config: