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

[BUG][NewHomePage] Temp Solution to avoid crash for user with no write permission #7054

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/7054.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [BUG][NewHomePage] Temp Solution to avoid crash for anonymous user with no write permission ([#7054](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7054))
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,7 @@
}

if (heroes || sections) {
homepage
.save({})
.then(() => error$.next(undefined))
.catch((e) => error$.next(e));
homepage.save({});

Check warning on line 130 in src/plugins/home/public/services/section_type/section_type.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/home/public/services/section_type/section_type.ts#L130

Added line #L130 was not covered by tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there anything that tracks fixing this permanently?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could open an issue. Currently we are using this tmp one for unblocking purpose.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually we could keep the issue open and revisit to see if there is better solution

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Anan. Will this fix have some potential issue as it swallowed the error. Will it show information that not suppose to show to user?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could leave a comment here to describe why it's crashed(I'm curious ;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

}
})
);
Expand Down
Loading