-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Description
Add the ability to revoke (delete) RBAC policies with proper confirmation dialog following the existing delete pattern.
Technical Details
Component: DeleteRbacPolicyDialog
File: apps/aurora-portal/src/client/routes/_auth/accounts/$accountId/projects/$projectId/network/-components/SecurityGroups/-components/-modals/DeleteRbacPolicyDialog.tsx
Interface:
interface DeleteRbacPolicyDialogProps {
policy: RbacPolicy | null
open: boolean
onClose: () => void
onConfirm: (policyId: string) => void
isLoading: boolean
error: string | null
}Design Pattern:
- Follow same pattern as
DeleteRuleDialogandDeleteSecurityGroupDialog - Type "delete" to confirm
- Show policy details in confirmation
Warning Message:
"This action cannot be undone. The target project will lose access to this security group."
Policy Details Box:
Display the policy information:
- Target Project ID:
{policy.target_tenant} - Policy ID:
{policy.id} - Created:
{policy.created_at}(optional, if available)
Important Note Message:
"Note: If the target project is currently using this security group (attached to instances or ports), the deletion may fail. Ensure the security group is not in use before revoking access."
Confirmation Input:
Type "delete" to confirm:
[Text Input]
Buttons:
- Cancel: Close without action
- "Revoke Access": Submit (only enabled when "delete" is typed)
Error Handling:
- 409 Conflict: "Cannot revoke access. The target project is currently using this security group. Remove it from their instances first."
- 404: "RBAC policy not found. It may have been already deleted."
- Generic: Display error message from API
Acceptance Criteria
- DeleteRbacPolicyDialog component created
- Dialog follows existing delete pattern
- Warning message about permanent action
- Policy details displayed (target project ID, policy ID)
- Info message about in-use policies
- Type "delete" confirmation required
- Submit button disabled until "delete" typed
- Cancel button closes dialog
- "Revoke Access" button submits deletion
- Loading state during deletion
- Error messages displayed in dialog
- 409 conflict error has specific message
- 404 error has specific message
- Dialog closes on successful deletion
- Dialog integrated in RbacPoliciesTable
- Delete button on each row opens dialog
- Can delete multiple policies in succession
Metadata
Metadata
Assignees
Labels
Type
Projects
Status