]> source.dussan.org Git - redmine.git/commitdiff
Fixes Redmine.pm broken by r2726 (#3330).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 12 May 2009 16:56:23 +0000 (16:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 12 May 2009 16:56:23 +0000 (16:56 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2732 e93f8b46-1217-0410-a6f0-8f06a7374b81

extra/svn/Redmine.pm

index a15b482e80e130714a47d7de7a985df502080619..20f79577925a7dd1449cce0135f2b4342540b331 100644 (file)
@@ -149,16 +149,18 @@ sub RedmineDSN {
   $self->{RedmineDSN} = $arg;
   my $query = "SELECT 
                  hashed_password, auth_source_id, permissions
-              FROM members, projects, users, roles
+              FROM members, projects, users, roles, member_roles
               WHERE 
-                projects.id=members.project_id 
+                projects.id=members.project_id
+                AND member_roles.member_id=members.id
                 AND users.id=members.user_id 
-                AND roles.id=members.role_id
+                AND roles.id=member_roles.role_id
                 AND users.status=1 
                 AND login=? 
                 AND identifier=? ";
   $self->{RedmineQuery} = trim($query);
 }
+
 sub RedmineDbUser { set_val('RedmineDbUser', @_); }
 sub RedmineDbPass { set_val('RedmineDbPass', @_); }
 sub RedmineDbWhereClause {