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

group_group_link_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0108f0b7fcaa987985e96fca50616c9453b74349 (plain)
1
2
3
4
5
6
7
8
# frozen_string_literal: true

class GroupGroupLinkPolicy < ::BasePolicy # rubocop:disable Gitlab/NamespacedClass
  condition(:can_read_shared_with_group) { can?(:read_group, @subject.shared_with_group) }
  condition(:group_member) { @subject.shared_group.member?(@user) }

  rule { can_read_shared_with_group | group_member }.enable :read_shared_with_group
end