Do not authorize project identifier with numbers only (would be interpreted as the project id in urls).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1108 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
12c0f5f66e
commit
0123dc3651
|
@ -217,6 +217,7 @@ protected
|
||||||
def validate
|
def validate
|
||||||
errors.add(parent_id, " must be a root project") if parent and parent.parent
|
errors.add(parent_id, " must be a root project") if parent and parent.parent
|
||||||
errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
|
errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
|
||||||
|
errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue