kibana/examples/guided_onboarding_example
Yulia Čech b75546f7eb
[Guided onboarding] Use Kibana features to grant access (#155065)
## Summary

Fixes https://github.com/elastic/kibana/issues/149132

This PR adds a Kibana feature for the guided onboarding plugin for
better permissions handling. By default `kibana_admin` and `editor`
roles are granted access to guided onboarding. The role `viewer` on the
other hand doesn't have enough permissions to see or use guided
onboarding. For any roles that don't have the correct permissions,
guided onboarding is completely disabled, the same as it's disabled
on-prem.
When creating a new role, the feature "Setup guides" can be enabled or
disabled.

### How to test
1. Add `xpack.cloud.id: 'testID'` to `/config/kibana.dev.yml`
1. Start ES with `yarn es snapshot` and Kibana with `yarn start``
2. Login as elastic and create a test user with the role `viewer`
3. Clear everything from your browser's local storage 
4. Login as the test user and check the following
- On the first visit, the "on-prem" welcome message is shown (not the
guided onboarding landing page)
- The url `/app/home#/getting_started` is unknown and redirects back to
the home page
- There is no button "Setup guides" in the header
- There is no link "Setup guides" in the help menu

### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-04-26 04:33:58 -07:00
..
common [Onboarding] Create guided_onboarding plugin (#138611) 2022-09-15 11:35:35 +02:00
public [Guided onboarding] Use Kibana features to grant access (#155065) 2023-04-26 04:33:58 -07:00
server [Guided onboarding] Register test guide in the example plugin (#147703) 2023-01-20 03:29:25 -07:00
.i18nrc.json [i18n] Fix ja-JP locale causing FATAL error when starting kibana (#146704) 2022-11-30 21:28:28 +03:00
kibana.jsonc [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md [Guided onboarding] Added plugin's README (#141219) 2022-09-21 07:44:06 -07:00
tsconfig.json [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00

guidedOnboardingExample

This plugin contains code examples for the Guided Onboarding plugin. More information can be found in KIBANA_FOLDER/src/plugins/guided_onboarding/README.md


Development

See the kibana contributing guide for instructions setting up your development environment.