-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Reporting] Fix check for security and added jest test #109429
[Reporting] Fix check for security and added jest test #109429
Conversation
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Co-authored-by: Michael Dokolin <dokmic@gmail.com>
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Friendly reminder: Looks like this PR hasn’t been backported yet. |
The following labels were identified as gaps in your version labels and will be added automatically:
If any of these should not be on your pull request, please manually remove them. |
Summary
Per the issue reported here: #108774. This contribution fixes a check for whether security is available and adds a test to confirm the expected behaviour. This brings the check in line with other places in Kibana like:
kibana/x-pack/plugins/ingest_pipelines/server/plugin.ts
Line 40 in ca6bb4b
How to test
This is a little bit tricky to test, since the code for throwing the ES error is only on 7.x branches and relates to a very specific state of licensing (trial without security enabled).
On the reported issue (#108774), this can be tested by downloading the linked snapshots and editing the javascript directly (adding the
security.license.isEnabled()
to the if statement).Internal Server Error
(should be clear with the fix applied)Checklist
Delete any items that are not applicable to this PR.