diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-25 19:32:05 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-03-25 19:32:05 +0000 |
commit | 1294f721755f415b9212fda82e4f40179c0921d4 (patch) | |
tree | 235b41e4eaac806cc1a7b7a3d1e644f1d7b23df4 /app/models/issue.rb | |
parent | 5663ca89facc10db2b9c665ecda6101ece14ce3e (diff) | |
download | redmine-1294f721755f415b9212fda82e4f40179c0921d4.tar.gz redmine-1294f721755f415b9212fda82e4f40179c0921d4.zip |
Fixed that issues can be moved to projects with issue tracking disabled (#10467).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9267 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index ee394a87b..f85ddfec4 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -800,18 +800,7 @@ class Issue < ActiveRecord::Base # Returns an array of projects that user can move issues to def self.allowed_target_projects_on_move(user=User.current) - projects = [] - if user.admin? - # admin is allowed to move issues to any active (visible) project - projects = Project.visible(user).all - elsif user.logged? - if Role.non_member.allowed_to?(:move_issues) - projects = Project.visible(user).all - else - user.memberships.each {|m| projects << m.project if m.roles.detect {|r| r.allowed_to?(:move_issues)}} - end - end - projects + Project.all(:conditions => Project.allowed_to_condition(user, :move_issues)) end private |