diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 10:32:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-27 10:32:43 +0000 |
commit | 547a5884d1ab6a22d9fc9ce79e5cf6f0310bc23d (patch) | |
tree | 655c2c0252d6ac08f0a825fac872f83845ee2e7f /lib/api/entities | |
parent | 25e94f0fc4c4666dbbacfcbdd6bce0380b8fe1d0 (diff) | |
download | gitlab-ce-547a5884d1ab6a22d9fc9ce79e5cf6f0310bc23d.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-4-stable-ee
Diffstat (limited to 'lib/api/entities')
-rw-r--r-- | lib/api/entities/project.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/entities/project.rb b/lib/api/entities/project.rb index df0c1d7a4c5..41320d184f9 100644 --- a/lib/api/entities/project.rb +++ b/lib/api/entities/project.rb @@ -100,7 +100,9 @@ module API expose :build_coverage_regex expose :ci_config_path, if: -> (project, options) { Ability.allowed?(options[:current_user], :download_code, project) } expose :shared_with_groups do |project, options| - SharedGroupWithProject.represent(project.project_group_links, options) + user = options[:current_user] + + SharedGroupWithProject.represent(project.visible_group_links(for_user: user), options) end expose :only_allow_merge_if_pipeline_succeeds expose :allow_merge_on_skipped_pipeline |