Commit bcdcf52
Matus Kasak
Prevent an admin from deleting their own account
Backport of the UFAL self-delete guard from dtq-dev (dspace-angular
#1335, #1357, #1373) to this customer branch. The EPeople registry and
the EPerson form now hide/disable the delete action for the currently
authenticated user (with an explanatory tooltip), show a contextual
warning in the confirmation modal when the target is a submitter and/or
an administrator, and surface a friendly notification when the backend
rejects a self-delete.
Shared logic lives in the new EPersonDeleteGuardService so both call
sites stay in sync.
Refs dataquest-dev/dspace-customers#8551 parent 6ce85de commit bcdcf52
2 files changed
Lines changed: 3 additions & 6 deletions
File tree
- src/app/access-control/epeople-registry
- eperson-form
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | | - | |
288 | | - | |
| 286 | + | |
| 287 | + | |
289 | 288 | | |
290 | 289 | | |
291 | 290 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
664 | 663 | | |
665 | 664 | | |
666 | 665 | | |
667 | | - | |
668 | | - | |
| 666 | + | |
669 | 667 | | |
670 | 668 | | |
671 | 669 | | |
| |||
0 commit comments