-
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
[Maps] fix users without access to Maps should not have the option to create them #88830
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
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.
thx for fixing.
we should also solve the case where the "visualize"-button is showing in Discover for geo-fields.
We could just not register the trigger when the user does not have priviliges
e.g.: something like
if (core.application.capabilities.maps.save) {
plugins.uiActions.addTriggerAction(VISUALIZE_GEO_FIELD_TRIGGER, visualizeGeoFieldAction);
} else {
plugins.visualizations.unRegisterAlias(APP_ID);
}
If we don't register the trigger, the visualize-button is no longer showing
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.
thx!
// unregisters the OSS alias | ||
plugins.visualizations.unRegisterAlias(PLUGIN_ID_OSS); | ||
|
||
if (core.application.capabilities.maps.show) { |
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.
👍
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Page load bundle
History
To update your PR or re-run it, just comment with: |
… create them (elastic#88830) * [Maps] fix users without access to Maps should not have the option to create them * fix test message * wrap add geo field trigger in show capabilities check Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
… create them (#88830) (#89209) * [Maps] fix users without access to Maps should not have the option to create them * fix test message * wrap add geo field trigger in show capabilities check Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Fixes #88723
This PR unregisters Maps visualization alias when a user does not have write permission to maps. This ensures the
Maps
card is not displayed in the visualize create menu when users do not have permission to create a map.