-
Notifications
You must be signed in to change notification settings - Fork 893
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
[Worksapce] Hide delete button for non osd admins in workspace list #8315
[Worksapce] Hide delete button for non osd admins in workspace list #8315
Conversation
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
isDashboardAdmin && ( | ||
<> | ||
<EuiButton color="danger" iconType="trash" onClick={onClick}> | ||
Delete {selection.length} Workspace | ||
</EuiButton> | ||
{deletedWorkspaces && deletedWorkspaces.length > 0 && ( | ||
<DeleteWorkspaceModal | ||
selectedWorkspaces={deletedWorkspaces} | ||
onClose={() => setDeletedWorkspaces([])} | ||
/> | ||
)} | ||
</> | ||
) | ||
); |
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.
should we hide the checkbox as well? the only action user can take for multiple select is batch delete, if we hide the delete button and keep multi select, that looks a little wired user can't do anything after select.
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.
ok
Signed-off-by: Kapian1234 <wanjinch@amazon.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8315 +/- ##
==========================================
- Coverage 64.14% 60.98% -3.17%
==========================================
Files 3743 3743
Lines 88836 88845 +9
Branches 13852 13857 +5
==========================================
- Hits 56981 54179 -2802
- Misses 31240 31312 +72
- Partials 615 3354 +2739
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…8315) * hide delete_workspace button for non osd admins in workspace list Signed-off-by: Kapian1234 <wanjinch@amazon.com> * Changeset file for PR #8315 created/updated * Disable selection of workspaces for non osd admins Signed-off-by: Kapian1234 <wanjinch@amazon.com> --------- Signed-off-by: Kapian1234 <wanjinch@amazon.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit 8fb8fed) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…8315) (#8376) * hide delete_workspace button for non osd admins in workspace list * Changeset file for PR #8315 created/updated * Disable selection of workspaces for non osd admins --------- (cherry picked from commit 8fb8fed) Signed-off-by: Kapian1234 <wanjinch@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>
…pensearch-project#8315) (opensearch-project#8376) * hide delete_workspace button for non osd admins in workspace list * Changeset file for PR opensearch-project#8315 created/updated * Disable selection of workspaces for non osd admins --------- (cherry picked from commit 8fb8fed) Signed-off-by: Kapian1234 <wanjinch@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>
Description
Hide delete button for non osd admins in workspace list
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration