Skip to content

Commit

Permalink
Fix default value for "readonly" in 7.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed Oct 21, 2021
1 parent 800cfb5 commit 9d56c48
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions x-pack/plugins/upgrade_assistant/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,17 @@ const kibanaVersion = new SemVer(MAJOR_VERSION);
// -------------------------------
// >= 8.x
// -------------------------------
const schemaLatest = schema.object(
{
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
/*
* This will default to true up until the last minor before the next major.
* In readonly mode, the user will not be able to perform any actions in the UI
* and will be presented with a message indicating as such.
*/
readonly: schema.boolean({ defaultValue: true }),
},
{ defaultValue: undefined }
);
const schemaLatest = schema.object({
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
/*
* This will default to true up until the last minor before the next major.
* In readonly mode, the user will not be able to perform any actions in the UI
* and will be presented with a message indicating as such.
*/
readonly: schema.boolean({ defaultValue: true }),
});

const configLatest: PluginConfigDescriptor<UpgradeAssistantConfig> = {
exposeToBrowser: {
Expand All @@ -46,21 +43,18 @@ export type UpgradeAssistantConfig = TypeOf<typeof schemaLatest>;
// -------------------------------
// 7.x
// -------------------------------
const schema7x = schema.object(
{
const schema7x = schema.object({
enabled: schema.boolean({ defaultValue: true }),
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
ui: schema.object({
enabled: schema.boolean({ defaultValue: true }),
}),
/*
* This will default to true up until the last minor before the next major.
* In readonly mode, the user will not be able to perform any actions in the UI
* and will be presented with a message indicating as such.
*/
readonly: schema.boolean({ defaultValue: true }),
},
{ defaultValue: undefined }
);
}),
/*
* This will default to true up until the last minor before the next major.
* In readonly mode, the user will not be able to perform any actions in the UI
* and will be presented with a message indicating as such.
*/
readonly: schema.boolean({ defaultValue: false }),
});

export type UpgradeAssistantConfig7x = TypeOf<typeof schema7x>;

Expand Down

0 comments on commit 9d56c48

Please sign in to comment.