Commit bd074d5c authored by Tan Le's avatar Tan Le

Remove audit_log_export_csv feature flag

This change makes audit log export to CSV feature generally available
for users on GitLab Premium.
parent 2abdaa63
......@@ -190,14 +190,7 @@ The search filters you can see depends on which audit level you are at.
## Export to CSV **(PREMIUM ONLY)**
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/1449) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.4.
> - It's [deployed behind a feature flag](../user/feature_flags.md), disabled by default.
> - It's disabled on GitLab.com.
> - It's not recommended for production use.
> - To use it in GitLab self-managed instances, ask a GitLab administrator to [enable it](#enable-or-disable-audit-log-export-to-csv). **(PREMIUM ONLY)**
CAUTION: **Warning:**
This feature might not be available to you. Check the **version history** note above for details.
If available, you can enable it with a [feature flag](#enable-or-disable-audit-log-export-to-csv).
> - [Feature flag removed](https://gitlab.com/gitlab-org/gitlab/-/issues/285441) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.7.
Export to CSV allows customers to export the current filter view of your audit log as a
CSV file, which stores tabular data in plain text. The data provides a comprehensive view with respect to
......@@ -237,22 +230,3 @@ The first row contains the headers, which are listed in the following table alon
The Audit Log CSV file is limited to a maximum of `100,000` events.
The remaining records are truncated when this limit is reached.
### Enable or disable Audit Log Export to CSV
The Audit Log Export to CSV is under development and not ready for production use. It is
deployed behind a feature flag that is **disabled by default**.
[GitLab administrators with access to the GitLab Rails console](../administration/feature_flags.md)
can enable it.
To enable it:
```ruby
Feature.enable(:audit_log_export_csv)
```
To disable it:
```ruby
Feature.disable(:audit_log_export_csv)
```
......@@ -26,8 +26,7 @@ class Admin::AuditLogReportsController < Admin::ApplicationController
private
def validate_audit_log_reports_available!
render_404 unless Feature.enabled?(:audit_log_export_csv) &&
License.feature_available?(:admin_audit_log)
render_404 unless License.feature_available?(:admin_audit_log)
end
def csv_filename
......
......@@ -39,6 +39,6 @@ module AuditEventsHelper
end
def export_url
Feature.enabled?(:audit_log_export_csv) ? admin_audit_log_reports_url(format: :csv) : ''
admin_audit_log_reports_url(format: :csv)
end
end
---
title: Remove audit_log_export_csv feature flag
merge_request: 48669
author:
type: added
---
name: audit_log_export_csv
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31191
rollout_issue_url:
milestone: '13.4'
type: development
group: group::compliance
default_enabled: false
......@@ -34,9 +34,8 @@ RSpec.describe Admin::AuditLogReportsController do
sign_in(admin)
end
context 'when licensed and feature flag is enabled' do
context 'when licensed' do
before do
stub_feature_flags(audit_log_export_csv: true)
stub_licensed_features(admin_audit_log: true)
allow(AuditEvents::ExportCsvService).to receive(:new).and_return(export_csv_service)
......@@ -108,14 +107,6 @@ RSpec.describe Admin::AuditLogReportsController do
end
end
context 'when feature flag is disabled' do
before do
stub_feature_flags(audit_log_export_csv: false)
end
it { is_expected.to have_gitlab_http_status(:not_found) }
end
context 'when unlicensed' do
before do
stub_licensed_features(admin_audit_log: false)
......
......@@ -97,20 +97,6 @@ RSpec.describe AuditEventsHelper do
describe '#export_url' do
subject { export_url }
context 'feature is enabled' do
before do
stub_feature_flags(audit_log_export_csv: true)
end
it { is_expected.to eq('http://test.host/admin/audit_log_reports.csv') }
end
context 'feature is disabled' do
before do
stub_feature_flags(audit_log_export_csv: false)
end
it { is_expected.to be_empty }
end
it { is_expected.to eq('http://test.host/admin/audit_log_reports.csv') }
end
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