-
Notifications
You must be signed in to change notification settings - Fork 916
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 <[email protected]>
ℹ️ 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 <[email protected]>
src/plugins/workspace/server/saved_objects/workspace_saved_objects_client_wrapper.test.ts
Show resolved
Hide resolved
Signed-off-by: Hailong Cui <[email protected]>
#6527) * Fix permission check failed with empty workspace for find method Signed-off-by: Hailong Cui <[email protected]> * Changeset file for PR #6527 created/updated * Add unit test case Signed-off-by: Hailong Cui <[email protected]> * address review comments Signed-off-by: Hailong Cui <[email protected]> --------- Signed-off-by: Hailong Cui <[email protected]> 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 <[email protected]> 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 <[email protected]> * Changeset file for PR opensearch-project#6527 created/updated * Add unit test case Signed-off-by: Hailong Cui <[email protected]> * address review comments Signed-off-by: Hailong Cui <[email protected]> --------- Signed-off-by: Hailong Cui <[email protected]> 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