summaryrefslogtreecommitdiffstats
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 1a2f96d56..1d13afa0e 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -267,14 +267,7 @@ class IssuesController < ApplicationController
def move
@issues.sort!
@copy = params[:copy_options] && params[:copy_options][:copy]
- @allowed_projects = []
- # find projects to which the user is allowed to move the issue
- if User.current.admin?
- # 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.roles.detect {|r| r.allowed_to?(:move_issues)}}
- end
+ @allowed_projects = Issue.allowed_target_projects_on_move
@target_project = @allowed_projects.detect {|p| p.id.to_s == params[:new_project_id]} if params[:new_project_id]
@target_project ||= @project
@trackers = @target_project.trackers