-
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
Users without access to Maps should not have the option to create them #88723
Comments
Pinging @elastic/kibana-app (Team:KibanaApp) |
Pinging @elastic/kibana-gis (Team:Geo) |
@legrego this is presumably a space/role issue? Is there API in the security plugin to check whether a user has access or not? |
@thomasneirynck the role is configured correctly, but Maps (or Visualize?) presumably isn't checking the user's privileges. The best way to check this is via UI Capabilities, which is exposed via Based on the UI Capabilities registered for Maps, I expect you'd need to check the class MyPublicMapsPlugin() {
public start(core: CoreStart) {
const canCreateMaps = core.application.capabilities.maps.save ?? false;
if (canCreateMaps) {
makeMapsVizTypeAvailable();
}
}
} |
This is a visualize problem since that menu is created by visualize. The menu needs to check that users have maps save capabilities |
Thanks, this is the part I wasn't sure about. I didn't know if Maps should conditionally register itself, or if Visualize needed to conditionally render. In any case, all the relevant parties are pinged on this issue 🙂 |
@nreese @thomasneirynck the wizard displays the Maps card only if it is registered from the maps plugin. So the check should happen on the maps plugin which should only register the alias if it has the permissions https://github.com/elastic/kibana/blob/master/x-pack/plugins/maps/public/plugin.ts#L142. |
@stratoula Is it possible to unregister viz types? I ask because Maps will not know the user's privileges until the So I expect that Maps would need a way to conditionally unregister or hide their viztype, rather then not register it at all. |
@legrego yes, there is ;) You can see here https://github.com/elastic/kibana/blob/master/x-pack/plugins/maps/public/plugin.ts#L166 that the maps plugin unregisters the OSS alias on the start phase. (This will be removed btw as we don't need it anymore) |
thanks @legrego and @stratoula. I will put up a PR to fix this issue |
re-opening this issue as I can reproduce it in 7.12.0 BC5 |
looks like #89092 removed the ability to hide the maps card. |
@nreese this removed the alias to the OSS not the ability to hide the maps card. The |
I am closing as I cant reproduce it |
Kibana version: tested on
master
Describe the bug:
The visualize application has a link to create Maps from their create workflow. Users who aren't authorized to create Maps specifically shouldn't be given this option.
Steps to reproduce:
All
access toVisualize
Create visualization
buttonExpected behavior:
I should not see an option to create Maps.
Screenshots (if relevant):
The text was updated successfully, but these errors were encountered: