Commit 1222dd09 authored by Doug Stull's avatar Doug Stull

Merge branch 'mw/clearup-ff_group_membership_export' into 'master'

Remove ff_group_membership_export flag

See merge request gitlab-org/gitlab!72624

This feature has been globally enabled for 2 milestones
and can safely be removed.

Changelog: added
EE: true
parents a24210f6 445a68ce
......@@ -527,10 +527,8 @@ API requests to add a new user to a project are not possible.
## Export members as CSV **(PREMIUM)**
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/287940) in GitLab 14.2.
FLAG:
On self-managed GitLab, by default this feature is available. To hide the feature per group, ask an administrator to [disable the :ff_group_membership_export flag](../../administration/feature_flags.md). On GitLab.com, this feature is available.
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/287940) in GitLab 14.2.
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/336520) in GitLab 14.5.
You can export a list of members in a group as a CSV.
......
......@@ -57,7 +57,7 @@ module EE
end
condition(:group_membership_export_available) do
@subject.feature_available?(:export_user_permissions) && ::Feature.enabled?(:ff_group_membership_export, @subject, default_enabled: :yaml)
@subject.feature_available?(:export_user_permissions)
end
condition(:can_owners_manage_ldap, scope: :global) do
......
---
name: ff_group_membership_export
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66755
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/336520
milestone: '14.2'
type: development
group: group::compliance
default_enabled: true
......@@ -276,23 +276,9 @@ RSpec.describe Groups::GroupMembersController do
end
describe 'GET #export_csv' do
context 'when flag is disabled' do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: false)
end
it 'responds with :not_found' do
get :export_csv, params: { group_id: group.id }
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'when feature is unlicensed' do
before do
stub_licensed_features(export_user_permissions: false)
stub_feature_flags(ff_group_membership_export: true)
end
it 'responds with :not_found' do
......@@ -302,10 +288,9 @@ RSpec.describe Groups::GroupMembersController do
end
end
context 'when feature is licensed and enabled' do
context 'when feature is licensed' do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: true)
end
it 'enqueues a worker job' do
......
......@@ -229,19 +229,10 @@ RSpec.describe GroupPolicy do
context 'when exporting user permissions is available' do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: true)
end
it { is_expected.to be_allowed(:export_group_memberships) }
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(ff_group_membership_export: false)
end
it { is_expected.not_to be_allowed(:export_group_memberships) }
end
end
context 'when group activity analytics is available' do
......
......@@ -21,25 +21,14 @@ RSpec.describe Groups::Memberships::ExportService do
context 'when unlicensed' do
before do
stub_licensed_features(export_user_permissions: false)
stub_feature_flags(ff_group_membership_export: true)
end
it_behaves_like 'not available'
end
context 'when disabled' do
context 'when licensed' do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: false)
end
it_behaves_like 'not available'
end
context 'when licensed and enabled' do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: true)
group.add_user(current_user, Gitlab::Access::OWNER)
end
......
......@@ -8,7 +8,6 @@ RSpec.describe Groups::ExportMembershipsWorker do
before do
stub_licensed_features(export_user_permissions: true)
stub_feature_flags(ff_group_membership_export: true)
group.add_owner(user)
end
......
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