Commit 2fffb34c authored by Sean McGivern's avatar Sean McGivern

Merge branch '323106-experiment-cleanup-invite_your_teammates_banner_a' into 'master'

Remove feature flag from invite members banner [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!59203
parents f0f7114a ed2bc2e2
...@@ -206,10 +206,9 @@ module GroupsHelper ...@@ -206,10 +206,9 @@ module GroupsHelper
end end
def show_invite_banner?(group) def show_invite_banner?(group)
Feature.enabled?(:invite_your_teammates_banner_a, group) && can?(current_user, :admin_group, group) &&
can?(current_user, :admin_group, group) && !just_created? &&
!just_created? && !multiple_members?(group)
!multiple_members?(group)
end end
def render_setting_to_allow_project_access_token_creation?(group) def render_setting_to_allow_project_access_token_creation?(group)
......
---
title: Remove feature flag from invite members banner
merge_request: 59203
author:
type: added
---
name: invite_your_teammates_banner_a
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37658
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/231275
milestone: '13.4'
type: development
group: group::expansion
default_enabled: false
...@@ -427,21 +427,16 @@ RSpec.describe GroupsHelper do ...@@ -427,21 +427,16 @@ RSpec.describe GroupsHelper do
before do before do
allow(helper).to receive(:current_user) { current_user } allow(helper).to receive(:current_user) { current_user }
allow(helper).to receive(:can?).with(current_user, :admin_group, group).and_return(can_admin_group) allow(helper).to receive(:can?).with(current_user, :admin_group, group).and_return(can_admin_group)
stub_feature_flags(invite_your_teammates_banner_a: feature_enabled_flag)
users.take(group_members_count).each { |user| group.add_guest(user) } users.take(group_members_count).each { |user| group.add_guest(user) }
end end
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
where(:feature_enabled_flag, :can_admin_group, :group_members_count, :expected_result) do where(:can_admin_group, :group_members_count, :expected_result) do
true | true | 1 | true true | 1 | true
true | false | 1 | false false | 1 | false
false | true | 1 | false true | 2 | false
false | false | 1 | false false | 2 | false
true | true | 2 | false
true | false | 2 | false
false | true | 2 | false
false | false | 2 | false
end end
with_them do with_them do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment