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] Fix permission check failed with empty workspace for find method #6527

Merged
merged 4 commits into from
Apr 19, 2024

Conversation

Hailong-am
Copy link
Collaborator

@Hailong-am Hailong-am commented Apr 18, 2024

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

  • fix: permission check failed with empty workspace for find method

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please 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.

Copy link
Contributor

❌ Changeset File Not Added Yet

Please ensure manual commit for changeset file 6527.yml under folder changelogs/fragments to complete this PR. File still missing.

SuZhou-Joe
SuZhou-Joe previously approved these changes Apr 18, 2024
Signed-off-by: Hailong Cui <[email protected]>
Signed-off-by: Hailong Cui <[email protected]>
@SuZhou-Joe SuZhou-Joe merged commit 432afc7 into opensearch-project:main Apr 19, 2024
65 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 23, 2024
#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>
SuZhou-Joe pushed a commit that referenced this pull request Apr 23, 2024
#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>
LDrago27 pushed a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 3, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants