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-01-17 03:14:49 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-01-17 03:14:49 +0300
commitaeaaaaf074f64a60e1b7827f6949d0aa78831460 (patch)
treeca8a81c0006d525e77daa8d1f63cddbb6716ea82 /app/models/group.rb
parent1323c36872baaed5d6ef87c47514cddc676b7b59 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/group.rb')
-rw-r--r--app/models/group.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/group.rb b/app/models/group.rb
index cacfe202fd2..92d7fddf736 100644
--- a/app/models/group.rb
+++ b/app/models/group.rb
@@ -780,6 +780,10 @@ class Group < Namespace
crm_settings&.enabled?
end
+ def shared_with_group_links_visible_to_user(user)
+ shared_with_group_links.preload_shared_with_groups.filter { |link| Ability.allowed?(user, :read_group, link.shared_with_group) }
+ end
+
private
def max_member_access(user_ids)