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

[Workspace] Only OSD admin can create workspace #6831

Merged

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented May 24, 2024

Description

Only OSD admin can create workspace

Issues Resolved

#6830

Screenshot

image

Testing the changes

  1. Clone the latest osd/security-dashboard plugin code and run yarn osd bootstrap
  2. Modify config/opensearch_dashboards.yml
opensearchDashboards.dashboardAdmin.groups: ["dashboard_admin"]
opensearchDashboards.dashboardAdmin.users: ["username"]
workspace.enabled: true 
opensearch.username: "username"
opensearch.password: "password" 
opensearch.ssl.verificationMode: none
savedObjects.permission.enabled: true
  1. Run yarn start --no-base-path
  2. Create a workspace.

Changelog

  • feat: [Workspace] Only OSD admin can create workspace

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

Signed-off-by: yubonluo <yubonluo@amazon.com>
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.43%. Comparing base (766a39a) to head (acadee6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6831      +/-   ##
==========================================
+ Coverage   67.41%   67.43%   +0.01%     
==========================================
  Files        3444     3444              
  Lines       67839    67847       +8     
  Branches    11033    11035       +2     
==========================================
+ Hits        45734    45751      +17     
+ Misses      19439    19429      -10     
- Partials     2666     2667       +1     
Flag Coverage Δ
Linux_1 33.08% <100.00%> (+0.01%) ⬆️
Linux_2 55.12% <ø> (ø)
Linux_3 45.25% <ø> (+<0.01%) ⬆️
Linux_4 34.82% <ø> (ø)
Windows_1 33.13% <100.00%> (+0.03%) ⬆️
Windows_2 55.09% <ø> (ø)
Windows_3 ?
Windows_4 34.82% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: yubonluo <yubonluo@amazon.com>
…OpenSearch-Dashboards into main-create-workspace-OSDAdmin
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
Signed-off-by: yubonluo <yubonluo@amazon.com>
…OpenSearch-Dashboards into main-create-workspace-OSDAdmin
@yubonluo
Copy link
Contributor Author

yubonluo commented Jun 3, 2024

CC @SuZhou-Joe @ruanyl If you don‘t have any concerns about this CR, could you please help me approve it?

SuZhou-Joe
SuZhou-Joe previously approved these changes Jun 3, 2024
Signed-off-by: yubonluo <yubonluo@amazon.com>
…OpenSearch-Dashboards into main-create-workspace-OSDAdmin
@SuZhou-Joe SuZhou-Joe merged commit 32fbe18 into opensearch-project:main Jun 4, 2024
74 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 4, 2024
* Only OSD admin can create workspace

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Changeset file for PR #6831 created/updated

* Changeset file for PR #6831 created/updated

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* delete useless code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* add integration tests

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* delete useless code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* add overwrite check

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Add the logic of whether to update the operation

Signed-off-by: yubonluo <yubonluo@amazon.com>

* optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Optimize the code

Signed-off-by: yubonluo <yubonluo@amazon.com>

---------

Signed-off-by: yubonluo <yubonluo@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 32fbe18)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit that referenced this pull request Jun 4, 2024
* Only OSD admin can create workspace



* Changeset file for PR #6831 created/updated

* Changeset file for PR #6831 created/updated

* optimize the code



* delete useless code



* add integration tests



* optimize the code



* delete useless code



* optimize the code



* optimize the code



* optimize the code



* add overwrite check



* optimize the code



* optimize the code



* Add the logic of whether to update the operation



* optimize the code



* Optimize the code



* Optimize the code



---------



(cherry picked from commit 32fbe18)

Signed-off-by: yubonluo <yubonluo@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>
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.

7 participants