When showing the "API keys" tab check if user has permissions to generate an API key.
[ ] Create HTTP endpoint that returns if user can manage own API keys. See how it is done here.
[ ] Add the new route to x-pack/plugins/security/server/routes/api_keys.
[ ] Cache the result retrieved from that endpoint.
[ ] Use the result retrieved from that endpoint to provide the hasPermission option in <ConnectionDetails> component, it will automatically render the "API keys" appropriately.
When showing the "API keys" tab check if user has permissions to generate an API key.
x-pack/plugins/security/server/routes/api_keys
.hasPermission
option in<ConnectionDetails>
component, it will automatically render the "API keys" appropriately.