summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-18 12:47:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-04-18 12:47:41 +0000
commit0004b526464fc65922497e95c0edf59f277e7a17 (patch)
treecae5d35cbe22800545fc07b3eb1612e3f811f1c7 /app/controllers
parentde51e16d2b938075699948f5d865b9fc0e698655 (diff)
downloadredmine-0004b526464fc65922497e95c0edf59f277e7a17.tar.gz
redmine-0004b526464fc65922497e95c0edf59f277e7a17.zip
Fixes behaviour of move_issues permission for non member role (#5309).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3683 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-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