Commit 8272e18e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Project path validation: array of not allowed paths

parent bf1a209936c9
......@@ -104,8 +104,10 @@ def check_limit
end
def repo_name
if path == "gitolite-admin"
errors.add(:path, " like 'gitolite-admin' is not allowed")
denied_paths = %w(gitolite-admin groups projects dashboard)
if denied_paths.include?(path)
errors.add(:path, "like #{path} is not allowed")
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment