Skip to content

Frontend: Delete confirmation + reassign-before-delete modals #585

In review
openedx/frontend-app-admin-console
#304

Description

@rodmgwgu

Two-step delete flow (per design):

Step 1 — "Delete ''?" confirmation. Body states the role is assigned to N team members and that you must reassign them to another role before deleting, or confirm to revoke their access permanently. Actions: Cancel, "Reassign members" (secondary -> step 2), "Delete anyway" (destructive — deletes the role and revokes those members' access). A role with 0 members should delete directly from a simple confirm.

Step 2 — "Reassign members before deleting" (after "Reassign members"). Body explains a replacement role will be assigned to the N users to prevent losing access. Controls: a "New role for assigned members" dropdown, a required checkbox "I understand this will update permissions for N members immediately.", actions Cancel / "Reassign & Delete" (destructive, enabled only when a replacement role is chosen and the checkbox is checked). On submit, reassign the members to the chosen role, then delete the original; toast and refresh.

Acceptance

  • Step-1 modal shows the live member count and the three actions; "Delete anyway" deletes + revokes.
  • "Reassign members" opens step 2; step-2 requires replacement role + confirmation checkbox before "Reassign & Delete" is enabled.
  • Submit calls reassign then delete; toast and refresh.
  • Standard roles never reach this flow.

Design: https://www.figma.com/design/xnmQJq1cTRVqNrs31R8zDM/AuthZ---v2?node-id=40000174-2&p=f&t=AfaPxKGH7lD48V93-0

Activity

  1. added
    willow
    on Oct 30, 2026
  2. rodmgwgu commented on Nov 5, 2026

    @rodmgwgu
    ContributorAuthor

    Under discussion: the draft Custom Roles API ADR for #469 (ADR 0036, not merged yet) proposes changes that affect this ticket. Nothing is final until the ADR is approved.

    Proposed change: "Reassign & Delete" is one call, not reassign followed by delete. DELETE /api/authz/v1/roles/<role>/?assignments=reassign&target_role=<role> moves the assignments and removes the role in one transaction, so a failure can't leave the members moved but the role still there. "Delete anyway" is ?assignments=revoke. A delete without assignments on a role with members returns 409, and a role with no members is deleted without it.

    The standalone reassign endpoint (#582) still exists for moving members without deleting.

  3. rodmgwgu commented on Nov 12, 2026

    @rodmgwgu
    ContributorAuthor

    Update: Reassign won't be implemented, only unassign and delete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

willow

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions