Skip to content

Backend: delete custom role #581

Open

Description

@rodmgwgu

Add an API operation to delete a custom role, removing its Casbin p rows and definition/relationship rows (per the persistence model). The UI drives two deletion paths the contract must support (define in #469):

  1. Delete + revoke ("Delete anyway"): delete the role and unassign all its members.
  2. Reassign + delete ("Reassign & Delete"): first reassign all members to a chosen replacement role, then delete the original.

Superuser-only. Standard roles are not deletable (ADR 0021).

Acceptance

  • Deleting a custom role removes its definition, role-permission and policy rows and its assignments.
  • Both the revoke-all and reassign-then-delete paths implemented and tested.
  • Audit recorded for the deletion and the member changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    willowReleased in Willow

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions