Project

General

Profile

Defect #3662 » LDAP_check_commit_access_in_Redmine.pm.patch

Make Redmine.pm check the redmine permissions for LDAP users. - Felix Schäfer, 2009-07-23 22:44

View differences:

Redmine.pm (working copy)
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;
......
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();
}
    (1-1/1)