72750: Finalize Delete eperson: workflow

This commit is contained in:
Yana De Pauw
2020-08-27 15:00:11 +02:00
parent 705b2b544f
commit e25cea2bb0
3 changed files with 108 additions and 118 deletions

View File

@@ -249,7 +249,7 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
log.error("This IOException: " + ex + " occured while deleting Eperson with the ID: " + ePerson.getID());
throw new AuthorizeException(new EPersonDeletionException());
} catch (EPersonDeletionException e) {
throw new IllegalStateException(e.getMessage());
throw new IllegalStateException(e);
}
}
@@ -284,7 +284,7 @@ public class EPersonServiceImpl extends DSpaceObjectServiceImpl<EPerson> impleme
List<EPerson> ePeople = groupService.allMembers(context, group);
if (ePeople.size() == 1 && ePeople.contains(ePerson)) {
throw new IllegalStateException(
"Refused to delete user " + ePerson.getID() + " because its part of the group " + group
"Refused to delete user " + ePerson.getID() + " because it is part of the group " + group
.getID());
}
}