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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 18:40:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 18:40:28 +0300
commitb595cb0c1dec83de5bdee18284abe86614bed33b (patch)
tree8c3d4540f193c5ff98019352f554e921b3a41a72 /lib/api/entities/group_detail.rb
parent2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff)
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'lib/api/entities/group_detail.rb')
-rw-r--r--lib/api/entities/group_detail.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/api/entities/group_detail.rb b/lib/api/entities/group_detail.rb
index e6872709432..e521de0d572 100644
--- a/lib/api/entities/group_detail.rb
+++ b/lib/api/entities/group_detail.rb
@@ -6,10 +6,12 @@ module API
expose :shared_with_groups do |group, options|
SharedGroupWithGroup.represent(group.shared_with_group_links_visible_to_user(options[:current_user]))
end
- expose :runners_token, if: lambda { |group, options| options[:user_can_admin_group] }
+ expose :runners_token, if: ->(_, options) { options[:user_can_admin_group] }
expose :prevent_sharing_groups_outside_hierarchy, if: ->(group) { group.root? }
- expose :projects, using: Entities::Project do |group, options|
+ expose :projects,
+ if: ->(_, options) { options[:with_projects] },
+ using: Entities::Project do |group, options|
projects = GroupProjectsFinder.new(
group: group,
current_user: options[:current_user],
@@ -19,7 +21,9 @@ module API
Entities::Project.prepare_relation(projects, options)
end
- expose :shared_projects, using: Entities::Project do |group, options|
+ expose :shared_projects,
+ if: ->(_, options) { options[:with_projects] },
+ using: Entities::Project do |group, options|
projects = GroupProjectsFinder.new(
group: group,
current_user: options[:current_user],