-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Guided onboarding] Use Kibana features to grant access #155065
Merged
yuliacech
merged 22 commits into
elastic:main
from
yuliacech:guided_onboarding/8.8/roles
Apr 26, 2023
Merged
Changes from 15 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f47827c
[Guided onboarding] Add a Kibana feature for guided onboarding to han…
yuliacech 40b3bab
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine f57bc64
[Guided onboarding] Remove the header button and the landing page rou…
yuliacech 1ba51f7
[Guided onboarding] Remove the help link if guided onboarding is disa…
yuliacech 16d92f6
[Guided onboarding] Add an error state to the example plugin
yuliacech 4d48b58
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 802bba1
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 2c8af74
[Guided onboarding] Fix cloud links tests
yuliacech 72e70d8
[Guided onboarding] Fix home plugin tests
yuliacech 5e9cee7
[Guided onboarding] Update home plugin snapshots
yuliacech 50e8d8d
[Guided onboarding] Fix security functional tests
yuliacech 266697f
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 547f790
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine f8d73b5
[Guided onboarding] Add a comment to the "read" feature privileges
yuliacech d09c6cc
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 77a5b7a
[Guided onboarding] Fix functional tests
yuliacech 6ab8f1d
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 1abaab9
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech d58198a
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 57bcef3
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 17f68ed
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech 98e2564
Merge branch 'main' into guided_onboarding/8.8/roles
yuliacech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import type { KibanaFeatureConfig } from '@kbn/features-plugin/common'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { DEFAULT_APP_CATEGORIES } from '@kbn/core/server'; | ||
import { PLUGIN_FEATURE, PLUGIN_ID } from '../common/constants'; | ||
import { guideStateSavedObjectsType, pluginStateSavedObjectsType } from './saved_objects'; | ||
|
||
export const GUIDED_ONBOARDING_FEATURE: KibanaFeatureConfig = { | ||
id: PLUGIN_FEATURE, | ||
name: i18n.translate('guidedOnboarding.featureRegistry.featureName', { | ||
defaultMessage: 'Setup guides', | ||
}), | ||
category: DEFAULT_APP_CATEGORIES.management, | ||
app: [PLUGIN_ID], | ||
privileges: { | ||
all: { | ||
app: [PLUGIN_ID], | ||
savedObject: { | ||
all: [guideStateSavedObjectsType, pluginStateSavedObjectsType], | ||
read: [], | ||
}, | ||
ui: ['enabled'], | ||
}, | ||
read: { | ||
// we haven't implemented "read-only" access yet, so this feature can only be granted | ||
// as "all" or "none" | ||
disabled: true, | ||
savedObject: { | ||
all: [], | ||
read: [], | ||
}, | ||
ui: [], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 29 additions & 6 deletions
35
src/plugins/home/public/application/components/__snapshots__/home.test.tsx.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API really should be
/internal/guided_onboarding
. I can't think of any reason why a user would need to use this API directly, and by using the/api
path prefix, we are indicating it is public, meaning you can't make any breaking changes to it without approvals, a long deprecation period, etc.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree @lukeelmers, I opened this issue to change the route's prefix. Our team was not aware of this convention when setting up the plugin.
What do you think, do we have to handle the prefix issue as a breaking change or can we update it in the next minor? The plugin was first released in 8.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it was introduced recently & is undocumented (and also something folks would be unlikely to discover and get much utility out of), then IMO if you fix it quickly, you are probably safe to change it, treat this as a bug, and document it in the release notes.