-
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
[Discover] Remove error when a user without default index patterns accesses #47705
[Discover] Remove error when a user without default index patterns accesses #47705
Conversation
- setting uiRoutes: requireDefaultIndex to false - retrieve defaultIndex if necessary in discover route - before it was set in load_default.js
@@ -91,7 +91,7 @@ const app = uiModules.get('apps/discover', [ | |||
|
|||
uiRoutes | |||
.defaults(/^\/discover(\/|$)/, { | |||
requireDefaultIndex: true, |
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.
When setting this to false, kibana no longer is trying to persist the defaultIndex
when none is set
kibana/src/legacy/core_plugins/kibana/public/management/route_setup/load_default.js
Line 89 in fcc4c48
config.set('defaultIndex', defaultId); |
💔 Build Failed |
💔 Build Failed |
retest |
💚 Build Succeeded |
…-09-discover-readonly-error
retest |
💔 Build Failed |
💔 Build Failed |
@elasticmachine merge upstream |
💔 Build Failed |
@elasticmachine merge upstream |
💚 Build Succeeded |
….com:kertal/kibana into kertal-pr-2019-10-09-discover-readonly-error
…-09-discover-readonly-error
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
Closed, #54122 will take over |
Summary
When a user with only Discover read permissions (And with no write permissions to kibana* indices) and without default index pattern accessed Discover, there was a 403 error displayed, because Kibana tried to persist the id of the first entry of the index pattern list as defaultIndex.
No Discover itself takes care of finding a valid defaultIndex, without persisting it.
Fixes #46124
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriately