Check permission before retrieving projects.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8532 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
81cf6b2343
commit
6539d04622
|
@ -246,8 +246,10 @@ class Issue < ActiveRecord::Base
|
|||
|
||||
safe_attributes 'project_id',
|
||||
:if => lambda {|issue, user|
|
||||
if user.allowed_to?(:move_issues, issue.project)
|
||||
projects = Issue.allowed_target_projects_on_move(user)
|
||||
projects.include?(issue.project) && projects.size > 1
|
||||
end
|
||||
}
|
||||
|
||||
safe_attributes 'tracker_id',
|
||||
|
|
Loading…
Reference in New Issue