From 80318fd3125f859093c0dff2229c5b64b1ede38a Mon Sep 17 00:00:00 2001 From: amadulhaxxani Date: Tue, 5 May 2026 15:09:42 +0200 Subject: [PATCH 01/12] Disable self-delete and add delete warnings Prevent administrators from deleting their own account by disabling the delete button for the current authenticated user and showing a tooltip. Add a warningLabel input to the confirmation modal and render it when present. Implement logic in EPeopleRegistryComponent to determine the current user, compute a contextual delete warning (submitter, admin, or both) by querying workspace/workflow submissions, search, and group membership, and open the confirmation modal with that warning. Handle delete responses to show a friendly notification for backend 400 self-delete errors and use a generic failure notification otherwise. Update templates, component imports and helper methods (isCurrentUser, getDeleteWarningLabel, hasSubmittedItems, isAdministrator, isSelfDeletionError, showSelfDeleteNotification), and extend unit tests to cover disabled self-delete UI, composed warning labels, and notification behavior. --- .../epeople-registry.component.html | 21 ++- .../epeople-registry.component.spec.ts | 125 ++++++++++++++- .../epeople-registry.component.ts | 148 ++++++++++++++++-- .../confirmation-modal.component.html | 1 + .../confirmation-modal.component.spec.ts | 13 ++ .../confirmation-modal.component.ts | 1 + 6 files changed, 282 insertions(+), 27 deletions(-) diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.html b/src/app/access-control/epeople-registry/epeople-registry.component.html index d19230e5e48..c70c5154e94 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.html +++ b/src/app/access-control/epeople-registry/epeople-registry.component.html @@ -76,11 +76,22 @@