diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-16 18:21:58 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-19 18:52:42 +0100 |
commit | 2e6c1720ead0f2843abb0d03f0c01b92fa063980 (patch) | |
tree | 2c1439a7519ed408cdbb3d497b3188d2c0051e2a /lib | |
parent | 40a6a077fde71b9b8ba4d449cc43f1428e14646d (diff) | |
download | gitlab-ce-2e6c1720ead0f2843abb0d03f0c01b92fa063980.tar.gz |
Allow Repositories API GET endpoints to be requested anonymously
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/repositories.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index c287ee34a68..4ca6646a6f1 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -2,7 +2,6 @@ require 'mime/types' module API class Repositories < Grape::API - before { authenticate! } before { authorize! :download_code, user_project } params do @@ -79,8 +78,6 @@ module API optional :format, type: String, desc: 'The archive format' end get ':id/repository/archive', requirements: { format: Gitlab::Regex.archive_formats_regex } do - authorize! :download_code, user_project - begin send_git_archive user_project.repository, ref: params[:sha], format: params[:format] rescue @@ -96,7 +93,6 @@ module API requires :to, type: String, desc: 'The commit, branch name, or tag name to stop comparison' end get ':id/repository/compare' do - authorize! :download_code, user_project compare = Gitlab::Git::Compare.new(user_project.repository.raw_repository, params[:from], params[:to]) present compare, with: Entities::Compare end @@ -105,8 +101,6 @@ module API success Entities::Contributor end get ':id/repository/contributors' do - authorize! :download_code, user_project - begin present user_project.repository.contributors, with: Entities::Contributor |