diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-20 14:36:50 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-20 14:36:50 +0000 |
commit | d84cfeaf21bb60c09061ad6c7bf135c37d063162 (patch) | |
tree | f9a1fceb8d6b9f21c79464484fd599bdecb6d38c /lib/api | |
parent | 1139da2745eb28be17c8fd6aa0f5de113c0f06a9 (diff) | |
parent | c87d93d462bb83caebd22bd759d8a1ead845d6a4 (diff) | |
download | gitlab-ce-d84cfeaf21bb60c09061ad6c7bf135c37d063162.tar.gz |
Merge branch '4269-public-repositories-api' into 'master'
Allow Repositories API GET endpoints to be requested anonymously
Closes #4269
See merge request !8148
Diffstat (limited to 'lib/api')
-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 |