diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-03-31 14:37:21 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-03-31 14:37:21 +0300 |
commit | 91761b06851832be643258f390ea7593beacae16 (patch) | |
tree | e4b7819dd34b3dd5090342f0dfdf263dea20cf10 /app/controllers/projects/repositories_controller.rb | |
parent | 2fdae52fd1048779a84770b39fe2961f31b1bd79 (diff) |
Add tests.
Diffstat (limited to 'app/controllers/projects/repositories_controller.rb')
-rw-r--r-- | app/controllers/projects/repositories_controller.rb | 6 |
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 |