summaryrefslogtreecommitdiff
path: root/lib/api/internal
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 12:07:45 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 12:07:45 +0000
commitac1dca43baa7b3b1ac7d60d89ad60fdeefed0b80 (patch)
tree33aa23ddf7f18ddbfba3d006041c460de88583b7 /lib/api/internal
parentf4186a753b86625a83e8499af14b5badd63a2ac2 (diff)
downloadgitlab-ce-ac1dca43baa7b3b1ac7d60d89ad60fdeefed0b80.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/internal')
-rw-r--r--lib/api/internal/base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/api/internal/base.rb b/lib/api/internal/base.rb
index 2e1891ac656..cca037b0705 100644
--- a/lib/api/internal/base.rb
+++ b/lib/api/internal/base.rb
@@ -108,6 +108,10 @@ module API
# check_ip - optional, only in EE version, may limit access to
# group resources based on its IP restrictions
post "/allowed" do
+ if repo_type.snippet? && Feature.disabled?(:version_snippets, actor.user)
+ break response_with_status(code: 404, success: false, message: 'The project you were looking for could not be found.')
+ end
+
# It was moved to a separate method so that EE can alter its behaviour more
# easily.
check_allowed(params)