| Summary: | [server] Error 500 when admin tries to delete a user | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mark Macdonald <mamacdon> |
| Component: | Server | Assignee: | Anthony Hunter <ahunter.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | ahunter.eclipse, john.arthorne |
| Version: | 5.0 | ||
| Target Milestone: | 6.0 M1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Mark Macdonald
Confirmed with the latest bits, this regression was introduced sometime after build I20140128-2230. Build I20140128-2230 does not have this issue. (In reply to Anthony Hunter from comment #1) > Confirmed with the latest bits, this regression was introduced sometime > after build I20140128-2230. Build I20140128-2230 does not have this issue. Actually, the user failed to be deleted in I20140128-2230, you just did not get an exception. The problem I introduced with the new simple metadata storage is that I throw an exception when you are told to asked to delete a project and it is not empty. I was trying to figure out what was going on here, and the issue does back to Orion 3.0 M2 and Bug 408590. The metadata implementation has never deleted the project contents. The WorkspaceResourceHandler and GitCloneHandler remove project contents and then remove the projects from the metadata. We added this in Bug 408590. The UserHandler has never deleted project contents. When you delete a user, it only deletes the user metadata. I have tested with the legacy metadata storage and when you delete a user, the projects are not deleted. The legacy metadata storage only deletes existing project contents when you create a new project so you do not get your old project contents. The proper way to handle this is to make UserHandler behave the same as WorkspaceResourceHandler and GitCloneHandler and remove all project contents before deleting the user. Fixed with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=fbc04deaa50c6b9076913e837ff5f1db00b16d4b I also updated the JUnit tests to ensure the a user with projects deletes correctly. |