Skip to content

[Files Plugin] Outcome of FileClient.delete is always returned as 'failure' #246926

@kowalczyk-krzysztof

Description

@kowalczyk-krzysztof

Kibana version: main

Elasticsearch version:

Server OS version:

Browser version:

Browser OS version:

Original install method (e.g. download page, yum, from source, etc.):

Describe the bug:

Steps to reproduce:

  1. Delete a file
  2. Check audit logs
  3. The file deletion log has failure outcome even though the file has been deleted

Expected behavior:
The outcome should be success

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:
This is most likely due to wrong usage of operators in createAuditEvent helper function:

outcome: outcome ?? error ? 'failure' : 'success',

The line gets evaluted as (outcome ?? error) ? 'failure' : 'success' which leads to the outcome being failure even though success is passed down in the delete function:

Metadata

Metadata

Labels

Team:SharedUXPlatform AppEx-SharedUX (formerly Global Experience) t//bugFixes for quality problems that affect the customer experience

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions