mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-07-29 11:57:26 +00:00
9 lines
365 B
Ruby
9 lines
365 B
Ruby
# 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_admin) { can?(:admin_group, @subject.shared_group) }
|
|
|
|
rule { can_read_shared_with_group | group_admin }.enable :read_shared_with_group
|
|
end
|