-
Notifications
You must be signed in to change notification settings - Fork 885
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] Fix permission check failed with empty workspace for find method #6527
[BUG] Fix permission check failed with empty workspace for find method #6527
Conversation
Signed-off-by: Hailong Cui <ihailong@amazon.com>
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 6527.yml under folder changelogs/fragments to complete this PR. If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link. For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool. |
❌ Changeset File Not Added YetPlease ensure manual commit for changeset file 6527.yml under folder changelogs/fragments to complete this PR. File still missing. |
src/plugins/workspace/server/saved_objects/workspace_saved_objects_client_wrapper.ts
Show resolved
Hide resolved
Signed-off-by: Hailong Cui <ihailong@amazon.com>
src/plugins/workspace/server/saved_objects/workspace_saved_objects_client_wrapper.test.ts
Show resolved
Hide resolved
Signed-off-by: Hailong Cui <ihailong@amazon.com>
#6527) * Fix permission check failed with empty workspace for find method Signed-off-by: Hailong Cui <ihailong@amazon.com> * Changeset file for PR #6527 created/updated * Add unit test case Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 432afc7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#6527) (#6608) * Fix permission check failed with empty workspace for find method * Changeset file for PR #6527 created/updated * Add unit test case * address review comments --------- (cherry picked from commit 432afc7) Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
opensearch-project#6527) * Fix permission check failed with empty workspace for find method Signed-off-by: Hailong Cui <ihailong@amazon.com> * Changeset file for PR opensearch-project#6527 created/updated * Add unit test case Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Description
when doing permission check, it will filter workspace list and verify there at least have 1 workspace user have permission, otherwise it will throw exception.
The bug is that, if we pass an empty array, that will go through this check and throw exception.
Issues Resolved
#6528
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration