diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-12 11:22:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-09-12 11:22:42 +0000 |
commit | 041277235bd243dbf37c4b2a18ae467667395765 (patch) | |
tree | 24438651b56fcf9b18b57510583069e4c5e2d958 /app | |
parent | 8faa66f68fb26b3da7050247d1cb024187f2f67f (diff) | |
download | redmine-041277235bd243dbf37c4b2a18ae467667395765.tar.gz redmine-041277235bd243dbf37c4b2a18ae467667395765.zip |
Slight change to the visibility SQL statement.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2878 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index a6b1ee482..46509d114 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] |