Slight change to the visibility SQL statement.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2878 e93f8b46-1217-0410-a6f0-8f06a7374b81
pull/351/head
Jean-Philippe Lang 15 years ago
parent 8faa66f68f
commit 041277235b
  1. 2
      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]

Loading…
Cancel
Save