Skip to content

[PB-6995]: feat/implement delete functionality for entities in management context - #162

Open
jzunigax2 wants to merge 4 commits into
mainfrom
feat/management-entities-deletion
Open

jzunigax2 wants to merge 4 commits into
mainfrom
feat/management-entities-deletion

Conversation

@jzunigax2

@jzunigax2 jzunigax2 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Depends on https://github.com/internxt/object-storage-server/pull/229, https://github.com/internxt/object-storage-server/pull/230 and https://github.com/internxt/object-storage-server/pull/232

What

Superadmins can now delete sub-accounts, partners and wholesalers from the Management Console. Every delete asks for confirmation first, and staff admins never see the option.

Why

Management needs to be able to delete partners or other entities, currently there is no way to do so from the console.

How

  • Role: ManagementProvider calls /management/me once the user is signed in and exposes isSuperadmin. The check fails closed: staff, legacy env logins and a failed /me all count as not superadmin.
  • Services: added deleteSubAccount and getMe (management.service.ts), deletePartner (partners.service.ts) and deleteWholesaler (wholesalers.service.ts), each with a unit test.
  • DeleteEntityButton: a new component that holds the button (header button or table-row icon variant) and the confirmation modal. It also exports Emphasis for the semibold details. ConfirmActionModal.description now accepts formatted content as well as plain text. Existing callers that pass a string still work.
  • Shared sub-account page: SubAccountDetailPage is also used by the partner console, so delete is an opt-in deleteSubAccount prop. Only the new ManagementSubAccountDetailPage wrapper passes it, and only for superadmins. The partner console is unchanged.

@jzunigax2 jzunigax2 added the enhancement New feature or request label Oct 27, 2026
@jzunigax2 jzunigax2 self-assigned this Oct 27, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
object-storage-management-web f88daf1 Commit Preview URL

Branch Preview URL
Oct 28 2026, 10:34 AM

@jzunigax2
jzunigax2 requested a review from sg-gs October 27, 2026 10:30
@jzunigax2 jzunigax2 changed the title feat: implement delete functionality for entities in management context [PB-6995]: feat/implement delete functionality for entities in management context Oct 27, 2026
@jzunigax2
jzunigax2 marked this pull request as ready for review October 27, 2026 10:42
- Added DeleteEntityButton component for confirming deletions.
- Integrated deletion capabilities for wholesalers, partners, and sub-accounts.
- Updated ManagementSubAccountDetailPage to conditionally allow deletion based on user role.
- Enhanced WholesalersTable and PartnerDetailPage to support deletion actions with appropriate notifications.
- Refactored ConfirmActionModal to accept ReactNode for description, improving flexibility.
@jzunigax2
jzunigax2 force-pushed the feat/management-entities-deletion branch from 04ca97a to dd95cb4 Compare October 28, 2026 10:07
@jzunigax2
jzunigax2 added this pull request to stack #169 October 28, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants