diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-10 20:38:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-02-10 20:38:23 +0000 |
commit | d02ddefff4f1d3800f7bdccb35c520a1155cccc5 (patch) | |
tree | 14f86f833f131e004a5d51f7c94e30678801a2b1 /app/models | |
parent | a8a49a26a19aaba10cfb6933f0c75686dd075195 (diff) | |
download | redmine-d02ddefff4f1d3800f7bdccb35c520a1155cccc5.tar.gz redmine-d02ddefff4f1d3800f7bdccb35c520a1155cccc5.zip |
Fixed: parent project field doesn't include blank value when a member with 'add subproject' permission edits a child project (#4790).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3405 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index b8030d7fd..58ef81140 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -249,7 +249,7 @@ class Project < ActiveRecord::Base return @allowed_parents if @allowed_parents @allowed_parents = Project.find(:all, :conditions => Project.allowed_to_condition(User.current, :add_subprojects)) @allowed_parents = @allowed_parents - self_and_descendants - if User.current.allowed_to?(:add_project, nil, :global => true) + if User.current.allowed_to?(:add_project, nil, :global => true) || (!new_record? && parent.nil?) @allowed_parents << nil end unless parent.nil? || @allowed_parents.empty? || @allowed_parents.include?(parent) |