Typo that triggers an error when editing a subproject (#5605).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11301 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-02-02 13:18:04 +00:00
parent 5fea79504c
commit 9536d04c1e
2 changed files with 8 additions and 1 deletions

View File

@ -653,7 +653,7 @@ class Project < ActiveRecord::Base
:if => lambda {|project, user| project.new_record? || user.allowed_to?(:select_project_modules, project) }
safe_attributes 'inherit_members',
:if => lambda {|project, user| project.parent.nil? || project.parent.visible?(:user)}
:if => lambda {|project, user| project.parent.nil? || project.parent.visible?(user)}
# Returns an array of projects that are in this project's hierarchy
#

View File

@ -392,6 +392,13 @@ class ProjectsControllerTest < ActionController::TestCase
assert_template 'settings'
end
def test_settings_of_subproject
@request.session[:user_id] = 2
get :settings, :id => 'private-child'
assert_response :success
assert_template 'settings'
end
def test_settings_should_be_denied_for_member_on_closed_project
Project.find(1).close
@request.session[:user_id] = 2 # manager