From 041277235bd243dbf37c4b2a18ae467667395765 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 12 Sep 2009 11:22:42 +0000 Subject: [PATCH] Slight change to the visibility SQL statement. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2878 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/project.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/project.rb b/app/models/project.rb index a6b1ee4820..46509d1146 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -129,7 +129,7 @@ class Project < ActiveRecord::Base if perm = Redmine::AccessControl.permission(permission) unless perm.project_module.nil? # If the permission belongs to a project module, make sure the module is enabled - base_statement << " AND EXISTS (SELECT em.id FROM #{EnabledModule.table_name} em WHERE em.name='#{perm.project_module}' AND em.project_id=#{Project.table_name}.id)" + base_statement << " AND #{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name='#{perm.project_module}')" end end if options[:project]