Commit 76129fce authored by Tim Zallmann's avatar Tim Zallmann

Merge branch '9928-remove-report_approver_rules-feature-flag' into 'master'

Remove report_approver_rules feature flag

Closes #9928

See merge request gitlab-org/gitlab-ee!15087
parents a7ce47aa 2eb62937
......@@ -22,9 +22,6 @@ export default {
...mapState({
rules: state => state.approvals.rules,
}),
reportApproverRulesAreEnabled() {
return Boolean(gon && gon.features && gon.features.reportApproverRules);
},
},
methods: {
summaryText(rule) {
......@@ -62,7 +59,7 @@ export default {
);
},
showVulnerabilityCheckPopover(rule) {
return this.reportApproverRulesAreEnabled && rule.name === VULNERABILITY_CHECK_NAME;
return rule.name === VULNERABILITY_CHECK_NAME;
},
},
};
......
......@@ -6,7 +6,6 @@ module EE
extend ::Gitlab::Utils::Override
prepended do
before_action :set_report_approver_rules_feature_flag, only: [:edit]
before_action :log_audit_event, only: [:download_export]
end
......@@ -83,10 +82,6 @@ module EE
project&.feature_available?(:merge_pipelines)
end
def set_report_approver_rules_feature_flag
push_frontend_feature_flag(:report_approver_rules, default_enabled: false)
end
def log_audit_event
AuditEvents::CustomAuditEventService.new(
current_user,
......
......@@ -42,7 +42,7 @@ module EE
merge_requests_for_source_branch.each do |merge_request|
::MergeRequests::SyncCodeOwnerApprovalRules.new(merge_request).execute if project.feature_available?(:code_owners)
::MergeRequests::SyncReportApproverApprovalRules.new(merge_request).execute if project.beta_feature_available?(:report_approver_rules)
::MergeRequests::SyncReportApproverApprovalRules.new(merge_request).execute if project.feature_available?(:report_approver_rules)
end
results
......
......@@ -7,7 +7,7 @@ module MergeRequests
end
def execute
if merge_request.target_project.beta_feature_available?(:report_approver_rules)
if merge_request.target_project.feature_available?(:report_approver_rules)
sync_rules
end
end
......
---
title: Enable security report approvals by default
merge_request: 15087
author:
type: added
......@@ -109,43 +109,23 @@ describe('Approvals ProjectRules', () => {
store.state.settings.allowMultiRule = true;
});
describe('when the `reportApproverRules` feature flag is enabled', () => {
beforeEach(() => {
gon.features = { reportApproverRules: true };
factory();
rows = wrapper.findAll('tbody tr');
});
it('should render the popover for the Vulnerability-Check group', () => {
const firstRow = rows.at(0);
const nameCell = findCell(firstRow, 'name');
expect(nameCell.find('.js-help').exists()).toBeTruthy();
});
it('should not render the popover for a standard approval group', () => {
const secondRow = rows.at(1);
const nameCell = findCell(secondRow, 'name');
expect(nameCell.find('.js-help').exists()).toBeFalsy();
});
beforeEach(() => {
factory();
rows = wrapper.findAll('tbody tr');
});
describe('when the `reportApproverRules` feature flag is disabled', () => {
beforeEach(() => {
gon.features = { reportApproverRules: false };
it('should render the popover for the Vulnerability-Check group', () => {
const firstRow = rows.at(0);
const nameCell = findCell(firstRow, 'name');
factory();
rows = wrapper.findAll('tbody tr');
});
expect(nameCell.find('.js-help').exists()).toBeTruthy();
});
it('should not render the popover for the Vulnerability-Check group', () => {
const firstRow = rows.at(0);
const nameCell = findCell(firstRow, 'name');
it('should not render the popover for a standard approval group', () => {
const secondRow = rows.at(1);
const nameCell = findCell(secondRow, 'name');
expect(nameCell.find('.js-help').exists()).toBeFalsy();
});
expect(nameCell.find('.js-help').exists()).toBeFalsy();
});
});
});
......@@ -13,7 +13,7 @@ describe MergeRequests::SyncReportApproverApprovalRules do
let!(:regular_approval_project_rule) { create(:approval_project_rule, project: merge_request.target_project) }
before do
stub_feature_flags(report_approver_rules: true)
stub_licensed_features(report_approver_rules: true)
end
it 'creates rule for report approvers' do
......@@ -43,10 +43,6 @@ describe MergeRequests::SyncReportApproverApprovalRules do
end
context 'when report_approver_rules are disabled' do
before do
stub_feature_flags(report_approver_rules: false)
end
it 'copies nothing' do
expect { service.execute }
.not_to change { merge_request.approval_rules.count }
......
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