Commit fb504b93 authored by Drew Blessing's avatar Drew Blessing Committed by Rémy Coutable

Remove saml_group_links feature flag

Removes the GitLab.com-only saml_group_links feature flag. The
feature has been default-enabled on GitLab.com since 13.7 with
no issues requiring it be disabled.
parent 2021dcee
---
name: saml_group_links
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/45080
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/267020
milestone: '13.6'
type: development
group: group::access
default_enabled: true
......@@ -2,7 +2,6 @@
module Groups
class SamlGroupLinksController < Groups::ApplicationController
before_action :require_saml_group_links_enabled
before_action :authorize_admin_saml_group_links!
layout 'group_settings'
......@@ -29,10 +28,6 @@ module Groups
private
def require_saml_group_links_enabled
render_404 unless ::Feature.enabled?(:saml_group_links, group, default_enabled: true)
end
def authorize_admin_saml_group_links!
access_denied! unless can?(current_user, :admin_saml_group_links, group)
end
......
......@@ -227,8 +227,7 @@ module EE
end
def saml_group_sync_available?
::Feature.enabled?(:saml_group_links, self, default_enabled: true) &&
feature_available?(:group_saml_group_sync) && root_ancestor.saml_enabled?
feature_available?(:group_saml_group_sync) && root_ancestor.saml_enabled?
end
override :multiple_issue_boards_available?
......
---
title: Remove saml_group_links feature flag
merge_request: 54986
author:
type: changed
......@@ -12,7 +12,6 @@ RSpec.describe Groups::SamlGroupLinksController do
before do
stub_licensed_features(group_saml: true, group_saml_group_sync: true)
stub_feature_flags(saml_group_links: true)
sign_in(user)
end
......@@ -21,14 +20,6 @@ RSpec.describe Groups::SamlGroupLinksController do
let_it_be(:saml_provider) { create(:saml_provider, group: group, enabled: true) }
let_it_be(:params) { route_params }
it 'renders 404 when the feature is disabled' do
stub_feature_flags(saml_group_links: false)
call_action
expect(response).to have_gitlab_http_status(:not_found)
end
it 'renders 404 when the user is not authorized' do
allow(controller).to receive(:can?).and_call_original
allow(controller).to receive(:can?).with(user, :admin_saml_group_links, group).and_return(false)
......
......@@ -14,7 +14,6 @@ RSpec.describe 'SAML group links' do
context 'when SAML group links is available' do
before do
stub_licensed_features(group_saml: true, group_saml_group_sync: true)
stub_feature_flags(saml_group_links: true)
create(:saml_provider, group: group, enabled: true)
......
......@@ -799,42 +799,28 @@ RSpec.describe Group do
describe '#saml_group_sync_available?' do
subject { group.saml_group_sync_available? }
context 'when saml_group_links is not enabled' do
before do
stub_feature_flags(saml_group_links: false)
end
it { is_expected.to eq(false) }
end
it { is_expected.to eq(false) }
context 'when saml_group_links is enabled' do
context 'with group_saml_group_sync feature licensed' do
before do
stub_feature_flags(saml_group_links: true)
stub_licensed_features(group_saml_group_sync: true)
end
it { is_expected.to eq(false) }
context 'with group_saml_group_sync feature licensed' do
context 'with saml enabled' do
before do
stub_licensed_features(group_saml_group_sync: true)
create(:saml_provider, group: group, enabled: true)
end
it { is_expected.to eq(false) }
it { is_expected.to eq(true) }
context 'with saml enabled' do
before do
create(:saml_provider, group: group, enabled: true)
end
context 'when the group is a subgroup' do
let(:subgroup) { create(:group, :private, parent: group) }
it { is_expected.to eq(true) }
context 'when the group is a subgroup' do
let(:subgroup) { create(:group, :private, parent: group) }
subject { subgroup.saml_group_sync_available? }
subject { subgroup.saml_group_sync_available? }
it { is_expected.to eq(true) }
end
it { is_expected.to eq(true) }
end
end
end
......
......@@ -29,7 +29,6 @@ RSpec.describe GroupSamlGroupSyncWorker do
context 'when the group has group_saml_group_sync feature licensed' do
before do
stub_licensed_features(group_saml_group_sync: true)
stub_feature_flags(saml_group_links: true)
end
context 'when SAML is not enabled' do
......
......@@ -214,7 +214,6 @@ RSpec.describe Gitlab::Ci::Variables::Collection::Sort do
context 'when FF :variable_inside_variable is enabled' do
before do
stub_licensed_features(group_saml_group_sync: true)
stub_feature_flags(saml_group_links: true)
stub_feature_flags(variable_inside_variable: true)
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