@@ -298,7 +298,7 class ApplicationController < ActionController::Base | |||||
298 | # Find issues with a single :id param or :ids array param |
|
298 | # Find issues with a single :id param or :ids array param | |
299 | # Raises a Unauthorized exception if one of the issues is not visible |
|
299 | # Raises a Unauthorized exception if one of the issues is not visible | |
300 | def find_issues |
|
300 | def find_issues | |
301 | @issues = Issue.find_all_by_id(params[:id] || params[:ids]) |
|
301 | @issues = Issue.where(:id => (params[:id] || params[:ids])).preload(:project, :status, :tracker, :priority, :author, :assigned_to, :relations_to).to_a | |
302 | raise ActiveRecord::RecordNotFound if @issues.empty? |
|
302 | raise ActiveRecord::RecordNotFound if @issues.empty? | |
303 | raise Unauthorized unless @issues.all?(&:visible?) |
|
303 | raise Unauthorized unless @issues.all?(&:visible?) | |
304 | @projects = @issues.collect(&:project).compact.uniq |
|
304 | @projects = @issues.collect(&:project).compact.uniq |
General Comments 0
You need to be logged in to leave comments.
Login now