Commit ed2bc2e2 authored by Jackie Fraser's avatar Jackie Fraser

Remove feature flag from invite members banner

The invite members banner is displayed on the
Group Overview page when:
- page viewer can admin group
- group has 1 or fewer members including yourself
- the group was not just created, so there is no
"Group successfully created" flash message also
on the page in that spot.

Changelog: added
parent ed19a0bd
......@@ -206,7 +206,6 @@ module GroupsHelper
end
def show_invite_banner?(group)
Feature.enabled?(:invite_your_teammates_banner_a, group) &&
can?(current_user, :admin_group, group) &&
!just_created? &&
!multiple_members?(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
before do
allow(helper).to receive(:current_user) { current_user }
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) }
end
using RSpec::Parameterized::TableSyntax
where(:feature_enabled_flag, :can_admin_group, :group_members_count, :expected_result) do
true | true | 1 | true
true | false | 1 | false
false | true | 1 | false
false | false | 1 | false
true | true | 2 | false
true | false | 2 | false
false | true | 2 | false
false | false | 2 | false
where(:can_admin_group, :group_members_count, :expected_result) do
true | 1 | true
false | 1 | false
true | 2 | false
false | 2 | false
end
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