RE: Redmine Repository Controls ยป redmine_repo_control.pm.patch
redmine_repository_control-new/apache/RedmineRepoControl.pm 2010-07-28 14:44:18.701581904 +0200 | ||
---|---|---|
276 | 276 |
# |
277 | 277 |
# 2. Check the role the user belongs to in the project for permissions |
278 | 278 |
# |
279 |
my $sth = $dbh->prepare("SELECT roles.id FROM members, projects, users, roles |
|
279 |
my $sth = $dbh->prepare("SELECT roles.id FROM members, projects, users, member_roles, roles
|
|
280 | 280 |
WHERE projects.id=members.project_id AND users.id=members.user_id |
281 |
AND roles.id=members.role_id AND users.status=1 AND login=? AND identifier=?"); |
|
281 |
AND users.id=members.user_id AND member_roles.member_id = members.id AND roles.id=member_roles.role_id |
|
282 |
AND users.status=1 AND login=? AND identifier=?"); |
|
282 | 283 |
$sth->execute($redmine_user, $project_id); |
283 | 284 |
while ( my($role_id) = $sth->fetchrow_array ) { |
284 | 285 |
#$r->log_error("$redmine_user was found to be in role $role_id for project $project_id"); |