summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-02-08 23:33:44 +0000
committerRobert Speicher <robert@gitlab.com>2016-02-08 23:33:44 +0000
commit201fb4c7e3f9ab4265f87f548ae22bb4008015c9 (patch)
tree9f203162f734ac6e214c9725b2479e5f3fccc021 /lib/api/entities.rb
parent2ad872382b49d4802a9ea5e2c7e8773949d83b2a (diff)
parent311f407651e9ad1859bb0e9b6b9d6de79fde1a3d (diff)
downloadgitlab-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/entities.rb')
-rw-r--r--lib/api/entities.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 82a75734de0..1aa6570bd06 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -72,6 +72,7 @@ module API
expose :star_count, :forks_count
expose :open_issues_count, if: lambda { |project, options| project.issues_enabled? && project.default_issues_tracker? }
expose :runners_token, if: lambda { |_project, options| options[:user_can_admin_project] }
+ expose :public_builds
end
class ProjectMember < UserBasic
@@ -383,7 +384,7 @@ module API
# for downloading of artifacts (see: https://gitlab.com/gitlab-org/gitlab-ce/issues/4255)
expose :download_url do |repo_obj, options|
if options[:user_can_download_artifacts]
- repo_obj.download_url
+ repo_obj.artifacts_download_url
end
end
expose :commit, with: RepoCommit do |repo_obj, _options|