diff options
author | Robert Speicher <robert@gitlab.com> | 2016-02-08 23:33:44 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-02-08 23:33:44 +0000 |
commit | 201fb4c7e3f9ab4265f87f548ae22bb4008015c9 (patch) | |
tree | 9f203162f734ac6e214c9725b2479e5f3fccc021 /lib/api/projects.rb | |
parent | 2ad872382b49d4802a9ea5e2c7e8773949d83b2a (diff) | |
parent | 311f407651e9ad1859bb0e9b6b9d6de79fde1a3d (diff) | |
download | gitlab-ce-201fb4c7e3f9ab4265f87f548ae22bb4008015c9.tar.gz |
Merge branch 'ci-permissions' into 'master'
Limit guest access to builds
Closes https://dev.gitlab.org/gitlab/gitlabhq/issues/2646
See merge request !1942
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r-- | lib/api/projects.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 1f991e600e3..6067c8b4a5e 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -99,6 +99,7 @@ module API # public (optional) - if true same as setting visibility_level = 20 # visibility_level (optional) - 0 by default # import_url (optional) + # public_builds (optional) # Example Request # POST /projects post do @@ -115,7 +116,8 @@ module API :namespace_id, :public, :visibility_level, - :import_url] + :import_url, + :public_builds] attrs = map_public_to_visibility_level(attrs) @project = ::Projects::CreateService.new(current_user, attrs).execute if @project.saved? @@ -145,6 +147,7 @@ module API # public (optional) - if true same as setting visibility_level = 20 # visibility_level (optional) # import_url (optional) + # public_builds (optional) # Example Request # POST /projects/user/:user_id post "user/:user_id" do @@ -161,7 +164,8 @@ module API :shared_runners_enabled, :public, :visibility_level, - :import_url] + :import_url, + :public_builds] attrs = map_public_to_visibility_level(attrs) @project = ::Projects::CreateService.new(user, attrs).execute if @project.saved? @@ -205,6 +209,7 @@ module API # shared_runners_enabled (optional) # public (optional) - if true same as setting visibility_level = 20 # visibility_level (optional) - visibility level of a project + # public_builds (optional) # Example Request # PUT /projects/:id put ':id' do @@ -219,7 +224,8 @@ module API :snippets_enabled, :shared_runners_enabled, :public, - :visibility_level] + :visibility_level, + :public_builds] attrs = map_public_to_visibility_level(attrs) authorize_admin_project authorize! :rename_project, user_project if attrs[:name].present? |