Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
06dda53560e3
Commit
06dda535
authored
Oct 30, 2012
by
Dmitriy Zaporozhets
Browse files
Project path validation: array of not allowed paths
parent
bf1a209936c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
06dda535
...
...
@@ -104,8 +104,10 @@
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment