Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2019-04-19 12:04:25 +0300
committerDouwe Maan <douwe@gitlab.com>2019-04-19 12:04:25 +0300
commit6376f78445300ee42c5a181f63e5b332d8266b0a (patch)
tree1d5716ab2080458920b39cadacc1926cd3db52c1 /lib
parent604cfb17a79b203dca7a2c56e84b58f8e819effd (diff)
parent1dd4a007804fa0e6ea00a00805d08808f6c0be3a (diff)
Merge branch '39858-add-group-owned-info-to-projects-api' into 'master'
Return group information on Project endpoint Closes #39858 See merge request gitlab-org/gitlab-ce!27427
Diffstat (limited to 'lib')
-rw-r--r--lib/api/entities.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 4bdac278add..ee8480122c4 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -922,7 +922,15 @@ module API
end
class NamespaceBasic < Grape::Entity
- expose :id, :name, :path, :kind, :full_path, :parent_id
+ expose :id, :name, :path, :kind, :full_path, :parent_id, :avatar_url
+
+ expose :web_url do |namespace|
+ if namespace.user?
+ Gitlab::Routing.url_helpers.user_url(namespace.owner)
+ else
+ namespace.web_url
+ end
+ end
end
class Namespace < NamespaceBasic