##// END OF EJS Templates
Merged r9755 from trunk....
Jean-Philippe Lang -
r9574:3883d5e2db4f
parent child
Show More
@@ -366,12 +366,19 sub is_member {
366 );
366 );
367 $sthldap->execute($auth_source_id);
367 $sthldap->execute($auth_source_id);
368 while (my @rowldap = $sthldap->fetchrow_array) {
368 while (my @rowldap = $sthldap->fetchrow_array) {
369 my $bind_as = $rowldap[3] ? $rowldap[3] : "";
370 my $bind_pw = $rowldap[4] ? $rowldap[4] : "";
371 if ($bind_as =~ m/\$login/) {
372 # replace $login with $redmine_user and use $redmine_pass
373 $bind_as =~ s/\$login/$redmine_user/g;
374 $bind_pw = $redmine_pass
375 }
369 my $ldap = Authen::Simple::LDAP->new(
376 my $ldap = Authen::Simple::LDAP->new(
370 host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]:$rowldap[1]" : $rowldap[0],
377 host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]:$rowldap[1]" : $rowldap[0],
371 port => $rowldap[1],
378 port => $rowldap[1],
372 basedn => $rowldap[5],
379 basedn => $rowldap[5],
373 binddn => $rowldap[3] ? $rowldap[3] : "",
380 binddn => $bind_as,
374 bindpw => $rowldap[4] ? $rowldap[4] : "",
381 bindpw => $bind_pw,
375 filter => "(".$rowldap[6]."=%s)"
382 filter => "(".$rowldap[6]."=%s)"
376 );
383 );
377 my $method = $r->method;
384 my $method = $r->method;
General Comments 0
You need to be logged in to leave comments. Login now