mirror of
https://github.com/redmine/redmine.git
synced 2025-11-15 09:46:02 +01:00
Error message when editing a child project without add project/subprojects permissions (#20282).
git-svn-id: http://svn.redmine.org/redmine/trunk@14619 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -39,7 +39,10 @@ module ObjectHelpers
|
||||
project
|
||||
end
|
||||
|
||||
def Project.generate_with_parent!(parent, attributes={})
|
||||
def Project.generate_with_parent!(*args)
|
||||
attributes = args.last.is_a?(Hash) ? args.pop : {}
|
||||
parent = args.size > 0 ? args.first : Project.generate!
|
||||
|
||||
project = Project.generate!(attributes) do |p|
|
||||
p.parent = parent
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user