-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Runtime field editor] Fix preview error when not enough privileges #115070
[Runtime field editor] Fix preview error when not enough privileges #115070
Conversation
Pinging @elastic/kibana-stack-management (Team:Stack Management) |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
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.
code looks good and works well!
Thanks for the review @mattkime ! |
There is a current limitation in the ES Painless
_execute
API that requires too many privileges (cluster privileges [manage,all])
. This is a problem when previewing a runtime field script.This PR brings a temporary fix to this problem by not using the
_execute
API but the_search
API.How to test
read
andview_index_metadata
privilege on one of the indicesemit('hello');
). --> You should see the preview of the script in the panel.emit(123);
--> you should get a casting errorFixes #114034
Fixes #114036
Fixes https://github.com/elastic/infra/issues/31927