Skip to content
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

Conversation

kertal
Copy link
Member

@kertal kertal commented Oct 9, 2019

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.

Bildschirmfoto 2019-10-09 um 16 24 50

No Discover itself takes care of finding a valid defaultIndex, without persisting it.

Fixes #46124

Checklist

Use strikethroughs to 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

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately

- 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,
Copy link
Member Author

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

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal kertal self-assigned this Oct 10, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal
Copy link
Member Author

kertal commented Oct 10, 2019

retest

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal
Copy link
Member Author

kertal commented Oct 11, 2019

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal
Copy link
Member Author

kertal commented Oct 11, 2019

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal
Copy link
Member Author

kertal commented Oct 12, 2019

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal closed this Oct 14, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@kertal kertal reopened this Oct 14, 2019
@elastic elastic deleted a comment from elasticmachine Oct 14, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal
Copy link
Member Author

kertal commented Jan 7, 2020

Closed, #54122 will take over

@kertal kertal closed this Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when accessing Discover as a read only user without index patterns / default index pattern
2 participants