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:
authorDouwe Maan <douwe@gitlab.com>2015-03-31 14:37:21 +0300
committerDouwe Maan <douwe@gitlab.com>2015-03-31 14:37:21 +0300
commit91761b06851832be643258f390ea7593beacae16 (patch)
treee4b7819dd34b3dd5090342f0dfdf263dea20cf10 /app/controllers/projects/repositories_controller.rb
parent2fdae52fd1048779a84770b39fe2961f31b1bd79 (diff)
Add tests.
Diffstat (limited to 'app/controllers/projects/repositories_controller.rb')
-rw-r--r--app/controllers/projects/repositories_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/projects/repositories_controller.rb b/app/controllers/projects/repositories_controller.rb
index 112365ba91a..96defb0c721 100644
--- a/app/controllers/projects/repositories_controller.rb
+++ b/app/controllers/projects/repositories_controller.rb
@@ -11,14 +11,10 @@ class Projects::RepositoriesController < Projects::ApplicationController
end
def archive
- unless can?(current_user, :download_code, @project)
- render_404 and return
- end
-
begin
file_path = ArchiveRepositoryService.new(@project, params[:ref], params[:format]).execute
rescue
- return render_404
+ return head :not_found
end
if file_path