kibana/examples
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
..
bfetch_explorer [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00
content_management_examples [CM] Onboard maps to cross-type search (#155148) 2023-04-21 07:41:08 -07:00
controls_example [Dashboard] Scroll to new panel (#152056) 2023-04-24 12:40:48 -07:00
data_view_field_editor_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
developer_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
embeddable_examples [Portable Dashboards] Add portable dashboard example plugin (#148997) 2023-02-10 13:21:53 -07:00
embeddable_explorer [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00
expressions_explorer [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
field_formats_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
files_example Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
guided_onboarding_example [Guided onboarding] Use Kibana features to grant access (#155065) 2023-04-26 04:33:58 -07:00
hello_world [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
locator_examples [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00
locator_explorer [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
partial_results_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
portable_dashboards_example [Analyst Experience Components] Dashboard & Control Group APIs (#150121) 2023-04-19 15:34:39 -04:00
preboot_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
response_stream Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
routing_example Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
screenshot_mode_example [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
search_examples Upgraded EUI to v76.0.0 (#152506) 2023-03-14 14:27:40 -05:00
share_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
state_containers_examples [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00
ui_action_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
ui_actions_explorer [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
user_profile_examples [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.asciidoc Add a few asciidoc readmes (#72082) 2020-07-17 11:08:57 -04:00

[[example-plugins]]
== Example plugins

This folder contains example plugins.  To run the plugins in this folder, use the `--run-examples` flag, via

[source,bash]
----
yarn start --run-examples
----