Fixed find_issues logic.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10905 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-12-02 10:25:30 +00:00
parent 6e1ff5bba6
commit e97a3ab97b
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ class ApplicationController < ActionController::Base
def find_issues
@issues = Issue.find_all_by_id(params[:id] || params[:ids])
raise ActiveRecord::RecordNotFound if @issues.empty?
raise Unauthorized if @issues.all?(&:visible?)
raise Unauthorized unless @issues.all?(&:visible?)
@projects = @issues.collect(&:project).compact.uniq
@project = @projects.first if @projects.size == 1
rescue ActiveRecord::RecordNotFound