diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 12:07:45 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 12:07:45 +0000 |
commit | ac1dca43baa7b3b1ac7d60d89ad60fdeefed0b80 (patch) | |
tree | 33aa23ddf7f18ddbfba3d006041c460de88583b7 /lib/api/internal | |
parent | f4186a753b86625a83e8499af14b5badd63a2ac2 (diff) | |
download | gitlab-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.rb | 4 |
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) |