Index: Redmine.pm =================================================================== --- Redmine.pm (revision 2817) +++ Redmine.pm (working copy) @@ -282,8 +282,8 @@ my $ret; while (my ($hashed_password, $auth_source_id, $permissions) = $sth->fetchrow_array) { + my $method = $r->method; unless ($auth_source_id) { - my $method = $r->method; if ($hashed_password eq $pass_digest && (defined $read_only_methods{$method} || $permissions =~ /:commit_access/) ) { $ret = 1; last; @@ -302,7 +302,7 @@ bindpw => $rowldap[4] ? $rowldap[4] : "", filter => "(".$rowldap[6]."=%s)" ); - $ret = 1 if ($ldap->authenticate($redmine_user, $redmine_pass)); + $ret = 1 if ($ldap->authenticate($redmine_user, $redmine_pass) && (defined $read_only_methods{$method} || $permissions =~ /:commit_access/)); } $sthldap->finish(); }