Fix timing issue with synchronizing the Kibana privileges to ES (#52214) (#52525)

This commit is contained in:
Brandon Kobel 2019-12-09 13:30:43 -05:00 committed by GitHub
parent 8586a2f0c8
commit 696ceb1c3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,7 +124,8 @@ export const security = (kibana) => new kibana.Plugin({
}
watchStatusAndLicenseToInitialize(server.plugins.xpack_main, this, async () => {
if (securityPlugin.__legacyCompat.license.getFeatures().allowRbac) {
const xpackInfo = server.plugins.xpack_main.info;
if (xpackInfo.isAvailable() && xpackInfo.feature('security').isEnabled()) {
await securityPlugin.__legacyCompat.registerPrivilegesWithCluster();
}
});