Commit a141b520 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'remove-instance_security_dashboard-ff' into 'master'

Remove instance_security_dashboard feature flag

See merge request gitlab-org/gitlab!79187
parents 18e9e74f eb53bce4
......@@ -4,9 +4,7 @@ module Security
class ApplicationController < ::ApplicationController
include SecurityDashboardsPermissions
before_action :check_feature_enabled!
before_action do
push_frontend_feature_flag(:instance_security_dashboard, default_enabled: true)
push_frontend_feature_flag(:vulnerability_management_survey, type: :ops, default_enabled: :yaml)
end
......@@ -14,10 +12,6 @@ module Security
protected
def check_feature_enabled!
render_404 unless Feature.enabled?(:instance_security_dashboard, default_enabled: true)
end
def vulnerable
@vulnerable ||= InstanceSecurityDashboard.new(
current_user,
......
......@@ -50,7 +50,6 @@ module EE
def security_dashboard_available?
security_dashboard = InstanceSecurityDashboard.new(current_user)
::Feature.enabled?(:instance_security_dashboard, default_enabled: true) &&
security_dashboard.feature_available?(:security_dashboard) &&
can?(current_user, :read_instance_security_dashboard, security_dashboard)
end
......
---
name: instance_security_dashboard
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24505
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/259285
milestone: '12.8'
type: development
group: group::threat insights
default_enabled: true
......@@ -153,16 +153,6 @@ RSpec.describe Security::ProjectsController do
end
end
context 'and the security dashboard feature is disabled' do
it '404s' do
stub_feature_flags(instance_security_dashboard: false)
subject
expect(response).to have_gitlab_http_status(:not_found)
end
end
it "removes the project from the current user's security dashboard" do
subject
......
......@@ -79,11 +79,6 @@ RSpec.describe DashboardHelper, type: :helper do
end
describe 'security dashboard link' do
context 'when the feature is enabled' do
before do
stub_feature_flags(instance_security_dashboard: true)
end
context 'and the feature is available on the license' do
before do
stub_licensed_features(security_dashboard: true)
......@@ -122,19 +117,6 @@ RSpec.describe DashboardHelper, type: :helper do
end
end
context 'when the feature is not enabled' do
before do
stub_feature_flags(instance_security_dashboard: false)
stub_licensed_features(security_dashboard: true)
stub_user_permissions_for(:security, true)
end
it 'is not included in the nav' do
expect(helper.dashboard_nav_links).not_to include(:security)
end
end
end
def stub_user_permissions_for(feature, enabled)
allow(helper).to receive(:can?).with(user, :read_cross_project).and_return(false)
......
......@@ -24,16 +24,6 @@ RSpec.shared_examples Security::ApplicationController do
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'and the security dashboard feature is disabled' do
it '404s' do
stub_feature_flags(instance_security_dashboard: false)
security_application_controller_child_action
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
context 'when the user is not authenticated' do
......
......@@ -25,16 +25,6 @@ RSpec.shared_examples 'security dashboard JSON endpoint' do
expect(response).to have_gitlab_http_status(:not_found)
end
end
context 'and the security dashboard feature is disabled' do
it '404s' do
stub_feature_flags(instance_security_dashboard: false)
security_dashboard_request
expect(response).to have_gitlab_http_status(:not_found)
end
end
end
context 'when the user is not authenticated' 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