Fixed: issue move by non-admin broken by r2726 (#3354).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2738 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-05-13 15:58:54 +00:00
parent 09a613b035
commit 566d0a6ceb
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ class IssuesController < ApplicationController
# admin is allowed to move issues to any active (visible) project
@allowed_projects = Project.find(:all, :conditions => Project.visible_by(User.current))
else
User.current.memberships.each {|m| @allowed_projects << m.project if m.role.allowed_to?(:move_issues)}
User.current.memberships.each {|m| @allowed_projects << m.project if m.roles.detect {|r| r.allowed_to?(:move_issues)}}
end
@target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id]
@target_project ||= @project