mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Throw error in kbn-es when no reserved users found (#65911)
This commit is contained in:
parent
45790d035b
commit
c0c7dccac7
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ exports.NativeRealm = class NativeRealm {
|
|||
}
|
||||
|
||||
const reservedUsers = await this.getReservedUsers();
|
||||
if (!reservedUsers || reservedUsers.length < 1) {
|
||||
throw new Error('no reserved users found, unable to set native realm passwords');
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
reservedUsers.map(async user => {
|
||||
await this.setPassword(user, options[`password.${user}`]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue