Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[DS-4036] Delete EPersons even if they are referenced #2229
DSpace references EPersons in different database tables like the
port to 6.x
work in progress
Oct 4, 2018
benbosman left a comment
The behavior when the user is part of the workflow is not clear to me yet, it seems the item would move to different workflow state when deleting a user. This is something the repository admin may not expect to happen. I did also add a few inline comments specific to the workflow.
If the user's confidential data (name, email address, …) would be replaced instead of deleting the EPerson, all these changes would no longer be required. That would avoid all the changes here, eliminates the risk of forgetting any customizations, and would ensure the items remain in their current state.
thank you for the review. I missed it in December and got aware of it by the end of last week. I know about the possibility to link "orphaned items" to a single user, often called ghost user. I agree, my approach is risking NPEs. But I'm doing this for the sake of a cleaner implementation in the long run. I want to avoid having to care about a ghost user everywhere, where we are dealing with EPersons.
You pointed out onw side-effects that we missed in deed. Thank you for finding that issue. A user being deleted may be the last user in a Workflow group. I think we have two bugs in DSpace that explains how I would expect DSpace to handle that case:
If we would resolve both bugs, DSpace would not skip any steps anymore and administrators would have a chance to give people access to workflow tasks whose workflow groups are empty. This might also be a way to solve https://jira.duraspace.org/browse/DS-1941.
I know that we want to move to the XMLWorkflowSteps in DSpace 7. All my notes above relate to the default Workflows of DSpace 6 and I have to test if these issues are the same for the XMLWorkflows.