summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorChris Baumbauer <cab@cabnetworks.net>2018-11-02 08:39:25 -0700
committerChris Baumbauer <cab@cabnetworks.net>2018-11-02 08:39:25 -0700
commitdc078c241765cfea5f49409407b82db7296c132d (patch)
treedeeabb4b302f896b60ffe8e27163a4dddf625c4b /lib/api/projects.rb
parent28a9bbceb7ab5ffe2305db02052d663b1e68ab8e (diff)
parenta80ee886e4b4a41ace5fb796bf920c4e395bf4dd (diff)
downloadgitlab-ce-dc078c241765cfea5f49409407b82db7296c132d.tar.gz
Merge branch 'master' into triggermesh-phase1-knative
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index ae2d327e45b..0a914f9012e 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -114,7 +114,8 @@ module API
options = options.reverse_merge(
with: current_user ? Entities::ProjectWithAccess : Entities::BasicProjectDetails,
statistics: params[:statistics],
- current_user: current_user
+ current_user: current_user,
+ license: false
)
options[:with] = Entities::BasicProjectDetails if params[:simple]
@@ -230,13 +231,17 @@ module API
params do
use :statistics_params
use :with_custom_attributes
+
+ optional :license, type: Boolean, default: false,
+ desc: 'Include project license data'
end
get ":id" do
options = {
with: current_user ? Entities::ProjectWithAccess : Entities::BasicProjectDetails,
current_user: current_user,
user_can_admin_project: can?(current_user, :admin_project, user_project),
- statistics: params[:statistics]
+ statistics: params[:statistics],
+ license: params[:license]
}
project, options = with_custom_attributes(user_project, options)