Fixed: search engine may reveal private projects (#1613).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1649 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-07-10 12:31:49 +00:00
parent de3d5a88e4
commit be4cc2f99e
4 changed files with 147 additions and 10 deletions
@@ -67,7 +67,7 @@ module Redmine
module ClassMethods
# Search the model for the given tokens
# projects argument can be either nil (will search all projects), a project or an array of projects
def search(tokens, projects, options={})
def search(tokens, projects=nil, options={})
tokens = [] << tokens unless tokens.is_a?(Array)
projects = [] << projects unless projects.nil? || projects.is_a?(Array)