22 lines
597 B
Ruby
22 lines
597 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module InviteMembersHelper
|
||
|
include Gitlab::Utils::StrongMemoize
|
||
|
|
||
|
def invite_members_allowed?(group)
|
||
|
Feature.enabled?(:invite_members_group_modal, group) && can?(current_user, :admin_group_member, group)
|
||
|
end
|
||
|
|
||
|
def directly_invite_members?
|
||
|
strong_memoize(:directly_invite_members) do
|
||
|
experiment_enabled?(:invite_members_version_a) && can_import_members?
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def indirectly_invite_members?
|
||
|
strong_memoize(:indirectly_invite_members) do
|
||
|
experiment_enabled?(:invite_members_version_b) && !can_import_members?
|
||
|
end
|
||
|
end
|
||
|
end
|