diff --git a/ee/app/helpers/audit_events_helper.rb b/ee/app/helpers/audit_events_helper.rb index 02ee2ab41690757465b931141256c179b362daa7..9003f5190fb3b7ce42b1b7391d86e34c927b0a20 100644 --- a/ee/app/helpers/audit_events_helper.rb +++ b/ee/app/helpers/audit_events_helper.rb @@ -59,7 +59,7 @@ def audit_log_app_data(is_last_page, events, audit_event_definitions) data.merge!({ empty_state_svg_path: image_path('illustrations/cloud.svg'), group_path: 'instance', - show_streams: 'true', + show_streams: License.feature_available?(:external_audit_events).to_s, audit_event_definitions: audit_event_definitions.to_json }) end diff --git a/ee/spec/helpers/audit_events_helper_spec.rb b/ee/spec/helpers/audit_events_helper_spec.rb index 35f7d3a59da8036b8dd8435e797e7405c9bafb6a..dad6388e1c0f7ead746bae52fc8e91a4826a41c1 100644 --- a/ee/spec/helpers/audit_events_helper_spec.rb +++ b/ee/spec/helpers/audit_events_helper_spec.rb @@ -169,6 +169,7 @@ def setup_permission(model, permission, current_user, has_permission) end it 'returns the correct data' do + stub_licensed_features(external_audit_events: true) expect(helper.audit_log_app_data(true, events, audit_event_definitions)).to contain_exactly( [:form_path, "/admin/audit_logs"], [:events, events.to_json],