-
Notifications
You must be signed in to change notification settings - Fork 936
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] Add permission tab to workspace create update page #6378
[Workspace] Add permission tab to workspace create update page #6378
Conversation
Signed-off-by: Lin Wang <[email protected]>
dc0928c
to
aeb2701
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6378 +/- ##
===========================================
+ Coverage 45.18% 55.58% +10.40%
===========================================
Files 1656 1199 -457
Lines 33591 24259 -9332
Branches 6385 4087 -2298
===========================================
- Hits 15177 13485 -1692
+ Misses 17244 10133 -7111
+ Partials 1170 641 -529
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
aeb2701
to
6d6cb4e
Compare
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
6d6cb4e
to
d1bf870
Compare
src/plugins/workspace/public/components/workspace_form/workspace_permission_setting_panel.tsx
Show resolved
Hide resolved
src/plugins/workspace/public/components/workspace_form/utils.ts
Outdated
Show resolved
Hide resolved
src/plugins/workspace/public/components/workspace_form/utils.ts
Outdated
Show resolved
Hide resolved
@wanglam Do we consider that if we only have the front security plugin, is it suitable for different authentication methods, such as identity center authentication? |
Signed-off-by: Lin Wang <[email protected]>
Signed-off-by: Lin Wang <[email protected]>
@Flyingliuhub For identity center authentication, the user id or group will be exists in request. We can read the user and group info from it and check if it's match the permission settings in workspace configuration. It's the same as other cases. I think it will work fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Lin Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…earch-project#6378) * Allow workspace update with partial attirbutes Signed-off-by: Lin Wang <[email protected]> * Add permissions tab for workspace creator and update page Signed-off-by: Lin Wang <[email protected]> * Add change log for adding permission tab Signed-off-by: Lin Wang <[email protected]> * Optimize permissions to permissions settings convertation Signed-off-by: Lin Wang <[email protected]> * Address PR comments Signed-off-by: Lin Wang <[email protected]> * Update comments for getPermissionModeId Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]>
…earch-project#6378) * Allow workspace update with partial attirbutes Signed-off-by: Lin Wang <[email protected]> * Add permissions tab for workspace creator and update page Signed-off-by: Lin Wang <[email protected]> * Add change log for adding permission tab Signed-off-by: Lin Wang <[email protected]> * Optimize permissions to permissions settings convertation Signed-off-by: Lin Wang <[email protected]> * Address PR comments Signed-off-by: Lin Wang <[email protected]> * Update comments for getPermissionModeId Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]>
…earch-project#6378) (#333) * Allow workspace update with partial attirbutes * Add permissions tab for workspace creator and update page * Add change log for adding permission tab * Optimize permissions to permissions settings convertation * Address PR comments * Update comments for getPermissionModeId --------- Signed-off-by: Lin Wang <[email protected]>
…earch-project#6378) (opensearch-project#333) * Allow workspace update with partial attirbutes * Add permissions tab for workspace creator and update page * Add change log for adding permission tab * Optimize permissions to permissions settings convertation * Address PR comments * Update comments for getPermissionModeId --------- Signed-off-by: Lin Wang <[email protected]>
* Allow workspace update with partial attirbutes Signed-off-by: Lin Wang <[email protected]> * Add permissions tab for workspace creator and update page Signed-off-by: Lin Wang <[email protected]> * Add change log for adding permission tab Signed-off-by: Lin Wang <[email protected]> * Optimize permissions to permissions settings convertation Signed-off-by: Lin Wang <[email protected]> * Address PR comments Signed-off-by: Lin Wang <[email protected]> * Update comments for getPermissionModeId Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> (cherry picked from commit d911fa7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
#6578) * Allow workspace update with partial attirbutes Signed-off-by: Lin Wang <[email protected]> * Add permissions tab for workspace creator and update page Signed-off-by: Lin Wang <[email protected]> * Add change log for adding permission tab Signed-off-by: Lin Wang <[email protected]> * Optimize permissions to permissions settings convertation Signed-off-by: Lin Wang <[email protected]> * Address PR comments Signed-off-by: Lin Wang <[email protected]> * Update comments for getPermissionModeId Signed-off-by: Lin Wang <[email protected]> --------- Signed-off-by: Lin Wang <[email protected]> (cherry picked from commit d911fa7) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR is for adding permission tab to workspace create and update page. There are mainly two parts will be included in this PR:
Issues Resolved
#6380
Screenshot
Testing the changes
yarn osd bootstrap
config/opensearch_dashboards.yml
and add below configs3.Run
yarn start --no-base-path
to start OSD server4. Login OSD and go to workspace create page
5. Fill workspace form and add permission setting
6. Click create and the new workspace will be created
7. Go to internal user create page and create a
test-user
like below image8. Login with
test-user
in another browser and go to workspace list pageIt will display
test-workspace
we added before.9. Click the pencil icon on the right of
test-workspace
and go to workspace update page10.Add some description in workspace update page
It will show
Invalid workspace permission
toast fortest-user
afterSave changes
clicked11. Login with workspace creator user and go to workspace update page
12. Update
test-user
withAdmin
permission13. Login with
test-user
and go to workspace update page, workspace description can be updated now.Check List
yarn test:jest
yarn test:jest_integration