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

[DataSource] Adding an optional setting that controls the permissions of data source to create/update/delete. #7091

Closed

Conversation

yubonluo
Copy link
Contributor

@yubonluo yubonluo commented Jun 24, 2024

Description

Adding an optional setting that controls the permissions of data source to create/update/delete.

Issues Resolved

#6889

Screenshot

data_source.editMode: "read_only" or
data_source.editMode: "admin_only" and user is not OSD Admin
Create:
image
image

Upate:
image
image

Delete:
image
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
data_source.enabled: true
data_source.editMode: "read_only|admin_only|none"
  1. Run yarn start --no-base-path
  2. Operate data source.

Changelog

  • feat: [DataSource] Add a flag to control the edit permission of datasource.

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

❌ Entry Too Long

Entry is 110 characters long, which is 10 characters longer than the maximum allowed length of 100 characters. Please revise your entry to be within the maximum length.

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.48%. Comparing base (7f0e9d0) to head (8f7101c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7091      +/-   ##
==========================================
+ Coverage   67.45%   67.48%   +0.02%     
==========================================
  Files        3448     3449       +1     
  Lines       67916    67972      +56     
  Branches    11042    11054      +12     
==========================================
+ Hits        45812    45870      +58     
- Misses      19435    19480      +45     
+ Partials     2669     2622      -47     
Flag Coverage Δ
Linux_1 33.08% <100.00%> (+<0.01%) ⬆️
Linux_2 55.11% <ø> (ø)
Linux_3 45.37% <100.00%> (+0.08%) ⬆️
Linux_4 34.86% <ø> (ø)
Windows_1 33.10% <100.00%> (+<0.01%) ⬆️
Windows_2 55.06% <ø> (ø)
Windows_3 45.38% <100.00%> (+0.09%) ⬆️
Windows_4 34.86% <ø> (ø)

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.

@SuZhou-Joe
Copy link
Member

Convert to draft as we need to discuss.

@SuZhou-Joe SuZhou-Joe marked this pull request as draft July 3, 2024 08:28
@yubonluo yubonluo closed this Jul 21, 2024
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.

3 participants