[Discover] Forbidden error when read only user uses API created index pattern #62373
Labels
Feature:Data Views
Data Views code and UI - index patterns before 8.0
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
triage_needed
Kibana version:
7.6.2
Elasticsearch version:
7.6.2
Describe the bug:
When a read only user uses an index pattern that does not yet have fields populated, a Forbidden error notification is displayed.
Steps to reproduce:
Expected behavior:
No error notification.
Any additional context:
I believe the error stems from
kibana/src/plugins/data/public/index_patterns/index_patterns/index_pattern.ts
Lines 481 to 483 in 911981d
Kibana appears to attempt to update the index pattern saved object's fields attribute if it is out of date (or missing); however, a read only user does not have permission to update the saved object. Since the save method is called under the catch, an error when saving is treated the same as an error in fetching the pattern. I think it would be reasonable in this case to ignore an exception raised when saving.
The text was updated successfully, but these errors were encountered: