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

Store workspace into path #6

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Conversation

SuZhou-Joe
Copy link
Owner

Description

Issues Resolved

Screenshot

Testing the changes

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2023

Codecov Report

Attention: Patch coverage is 81.21693% with 71 lines in your changes are missing coverage. Please review.

Project coverage is 67.00%. Comparing base (790c076) to head (86ac4a8).
Report is 27 commits behind head on main.

Files Patch % Lines
...ed_objects_wrapper_for_check_workspace_conflict.ts 86.58% 3 Missing and 8 partials ⚠️
...ore/server/saved_objects/permission_control/acl.ts 87.50% 3 Missing and 7 partials ⚠️
.../plugins/application_config/server/routes/index.ts 76.47% 8 Missing ⚠️
src/core/public/utils/workspace.ts 14.28% 6 Missing ⚠️
...lic/injected_metadata/injected_metadata_service.ts 0.00% 4 Missing ⚠️
src/plugins/application_config/server/plugin.ts 78.94% 3 Missing and 1 partial ⚠️
src/core/server/saved_objects/routes/import.ts 0.00% 3 Missing ⚠️
...rver/saved_objects/routes/resolve_import_errors.ts 0.00% 3 Missing ⚠️
...components/create_form/create_data_source_form.tsx 76.92% 2 Missing and 1 partial ⚠️
...rce/components/edit_form/edit_data_source_form.tsx 76.92% 2 Missing and 1 partial ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #6      +/-   ##
==========================================
- Coverage   67.00%   67.00%   -0.01%     
==========================================
  Files        3307     3318      +11     
  Lines       63614    64038     +424     
  Branches    10163    10261      +98     
==========================================
+ Hits        42627    42910     +283     
- Misses      18518    18614      +96     
- Partials     2469     2514      +45     
Flag Coverage Δ
Linux_1 ?
Linux_2 ?
Linux_3 ?
Linux_4 ?
Windows_1 31.68% <47.82%> (-3.56%) ⬇️
Windows_2 54.98% <75.47%> (-0.08%) ⬇️
Windows_3 44.43% <56.48%> (+0.80%) ⬆️
Windows_4 35.15% <11.76%> (-0.05%) ⬇️

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 and others added 17 commits February 29, 2024 10:07
* feat: add ruanyl as a maintainer

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add CHANGELOG

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
* add BionIT as a maintainer

Signed-off-by: Flyingliuhub <33105471+flyingliuhub@users.noreply.github.com>

* update pr link in the changelog.md

Signed-off-by: Flyingliuhub <33105471+flyingliuhub@users.noreply.github.com>

---------

Signed-off-by: Flyingliuhub <33105471+flyingliuhub@users.noreply.github.com>
…th type (opensearch-project#5997)

* fix schema for test connection

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
…t#5855)

* Add application configuration service

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update API path name

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* implement two APIs/interfaces

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* expose get function for other plugins to use

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update interfaces

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* implement the APIs and interfaces

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add license and jsdoc

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update docs

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add more docs

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update variable name

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove unnecessary dependency

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* format readme

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* use osd version

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove debugging info

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update logging

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove lint js

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove logs

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update name style

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update function visibility and error function

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* fix unit test failures

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add unit test

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove lint file

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add more tests

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add unit tests for routes

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add remaining unit tests

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add enabled to this plugin

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update readme to mention experimental

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update change log

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* dummy commit to trigger workflow rerun

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove experimental

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add key to yml file

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove i18n

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* remove lint rc

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update comment style

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add input validation

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update unit tests

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* prevent multiple registration

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add return types

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* update readme wording

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add unit test to the plugin class about double register

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* move related ymls

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* move validation to a function

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* use trimmed versions

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* reword changelog entry

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* readability

Signed-off-by: Tianle Huang <tianleh@amazon.com>

* add back yml change

Signed-off-by: Tianle Huang <tianleh@amazon.com>

---------

Signed-off-by: Tianle Huang <tianleh@amazon.com>
…ct#5949)

* refact: move workspace specific logic to savedObjectWrapper

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: some error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: fix test error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless config in test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add CHANGELOG

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add more unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: revert test in repository.test.js

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: revert test in import_saved_objects.test.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: revert test in repository.test.js

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add type

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: bootstrap type error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code and add comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: integration test fail

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add missing code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Add permissions field to the mapping only if the permission control is enabled

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* feat: modify unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: bulk create error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: bulk create error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add new config in yml file

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add new config in yml file

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: update yml file

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: fix unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: do not skip migration when doing integration test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: remove useless code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: change flag variable

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add test cases

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: gaobinlong <gbinlong@amazon.com>
Co-authored-by: gaobinlong <gbinlong@amazon.com>
…g to top (opensearch-project#6008)

* [BUG][Discover] Enable 'Back to Top' Feature in Discover for scrolling to top

dscCanvas is the one with scrollable prop. Set window.scrollTo(0, 0) on table will
not work. In this PR, we add a ref to EuiPanel directly.

Issue Resolve:
opensearch-project#6006

---------

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
Co-authored-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
…ct#6012)

* feat: temp save

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: add some comment

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
…opensearch-project#6002)

* [TokenExchange] Render credential form registered from AuthMethod

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* [UT] Add unittest to test registered credential form get rendered in create datasource page

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* [UT] Update  test case descriptions

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* [Token Exchange] improve code format in create datasource page

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* [UT] Add unit test for edit datasource page

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* Update changelog file

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* update yml config file to original status

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* Resolving comments

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* [UT] Add more unit test to cover existing auth type and plugin registered Auth type scenario

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

* Resolving comments, update pmport path

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>

---------

Signed-off-by: Xinrui Bai <xinruiba@amazon.com>
…oject#6019)

(cherry picked from commit 1da1320)

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.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>
* [Workspace] Add ACL related functions for workspace (opensearch-project#146)

* [Workspace] Add acl related functions for workspace

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Minor change

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Modify changelog

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more unit test cases

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Modify test case

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Some minor change

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more test cases

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Optimize some code and the comments of the functions

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add more comments for some basic functions

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Export more interfaces

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* consume permissions in repository

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: consume permissions in serializer

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Add unit tests for consuming permissions in repository

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove double exclamation

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Rename some variables

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove duplicated semicolon

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add permissions field to the mapping only if the permission control is enabled

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Add feature flag config to the yml file

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Make the comment of feature flag more clear

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Make comment more clear

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Remove management permission type

Signed-off-by: gaobinlong <gbinlong@amazon.com>

* Fix test failure

Signed-off-by: gaobinlong <gbinlong@amazon.com>

---------

Signed-off-by: gaobinlong <gbinlong@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: Josh Romero <rmerqg@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
…tup (opensearch-project#6030)

* expose picker using function in plugin setup

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add changelog and test

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
* adds callback ref to lazy loading sentinel
---------

Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com>
…eld (opensearch-project#6025)

This PR is to add a migration function with version 2.4.0 for datasource to add a migrationVersion field.
For more information, please refer to the RFC: opensearch-project#6022

Issues Resolved
opensearch-project#6022

Signed-off-by: Yibo Wang <yibow@amazon.com>
…pensearch-project#6042)

* change component name

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add change log

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
* Correct CHANGELOG

Signed-off-by: Bandini Bhopi <bandinib@amazon.com>

* Remove empty line

Signed-off-by: Bandini Bhopi <bandinib@amazon.com>

* Corrected link for 6025

Signed-off-by: Bandini Bhopi <bandinib@amazon.com>

---------

Signed-off-by: Bandini Bhopi <bandinib@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/stateful_url_path branch from b803de8 to 7130b3c Compare March 7, 2024 03:02
Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: remove useless change

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: optimize url listener

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: make formatUrlWithWorkspaceId extensible

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: modify the async format to be sync function

Signed-off-by: SuZhoue-Joe <suzhou@amazon.com>

feat: use path to maintain workspace info

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: optimize code

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

feat: format

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
@SuZhou-Joe SuZhou-Joe force-pushed the feature/stateful_url_path branch from 7130b3c to 86ac4a8 Compare March 7, 2024 03:05
SuZhou-Joe added a commit that referenced this pull request Mar 7, 2024
* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe added a commit that referenced this pull request Apr 3, 2024
…ject#6052)

* Add permission control for workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add changelog for permission control in workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix integration tests and remove no need type

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update permission enabled for workspace CRUD integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Change back to config schema

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: do not append workspaces field when no workspaces present (#6)

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: authInfo destructure (#7)

* fix: authInfo destructure

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Fix permissions assign in attributes

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove deleteByWorkspace since not exists

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: remove formatWorkspacePermissionModeToStringArray

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove current not used code

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add missing unit tests for permission control

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update workspaces API test describe

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests failed

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Address PR comments

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Store permissions when savedObjects.permissions.enabled

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add permission control for deleteByWorkspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Refactor permissions field in workspace create and update API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe added a commit that referenced this pull request Apr 7, 2024
* [Workspace]Add permission control logic for workspace (opensearch-project#6052)

* Add permission control for workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add changelog for permission control in workspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix integration tests and remove no need type

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update permission enabled for workspace CRUD integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Change back to config schema

Signed-off-by: Lin Wang <wonglam@amazon.com>

* feat: do not append workspaces field when no workspaces present (#6)

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* feat: do not append workspaces field when no workspaces present

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: authInfo destructure (#7)

* fix: authInfo destructure

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* fix: unit test error

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

---------

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Fix permissions assign in attributes

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove deleteByWorkspace since not exists

Signed-off-by: Lin Wang <wonglam@amazon.com>

* refactor: remove formatWorkspacePermissionModeToStringArray

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Remove current not used code

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add missing unit tests for permission control

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update workspaces API test describe

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests failed

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Address PR comments

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Store permissions when savedObjects.permissions.enabled

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Add permission control for deleteByWorkspace

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Update src/plugins/workspace/server/permission_control/client.ts

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>

* Refactor permissions field in workspace create and update API

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace CRUD API integration tests

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Signed-off-by: Lin Wang <wonglam@amazon.com>

* Convert permission settings in client side

Signed-off-by: Lin Wang <wonglam@amazon.com>

* Fix workspace list always render

Signed-off-by: Lin Wang <wonglam@amazon.com>

---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
SuZhou-Joe added a commit that referenced this pull request Jul 1, 2024
…ject#6052) (opensearch-project#6531)

* Add permission control for workspace



* Add changelog for permission control in workspace



* Fix integration tests and remove no need type



* Update permission enabled for workspace CRUD integration tests



* Change back to config schema



* feat: do not append workspaces field when no workspaces present (#6)

* feat: do not append workspaces field when no workspaces present



* feat: do not append workspaces field when no workspaces present



---------



* fix: authInfo destructure (#7)

* fix: authInfo destructure



* fix: unit test error



---------



* Fix permissions assign in attributes



* Remove deleteByWorkspace since not exists



* refactor: remove formatWorkspacePermissionModeToStringArray



* Remove current not used code



* Add missing unit tests for permission control



* Update workspaces API test describe



* Fix workspace CRUD API integration tests failed



* Address PR comments



* Store permissions when savedObjects.permissions.enabled



* Add permission control for deleteByWorkspace



* Update src/plugins/workspace/server/permission_control/client.ts



* Update src/plugins/workspace/server/permission_control/client.ts



* Refactor permissions field in workspace create and update API



* Fix workspace CRUD API integration tests



---------

Signed-off-by: Lin Wang <wonglam@amazon.com>
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
Co-authored-by: ZilongX <99905560+ZilongX@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.