Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/tags.rb')
-rw-r--r--lib/api/tags.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/api/tags.rb b/lib/api/tags.rb
index 0fa8c21f8d7..97a2aebf53b 100644
--- a/lib/api/tags.rb
+++ b/lib/api/tags.rb
@@ -6,7 +6,11 @@ module API
TAG_ENDPOINT_REQUIREMENTS = API::NAMESPACE_OR_PROJECT_REQUIREMENTS.merge(tag_name: API::NO_SLASH_URL_PART_REGEX)
- before { authorize! :download_code, user_project }
+ before do
+ authorize! :download_code, user_project
+
+ not_found! unless user_project.repo_exists?
+ end
params do
requires :id, type: String, desc: 'The ID of a project'