manifold icon indicating copy to clipboard operation
manifold copied to clipboard

Deleting a user makes projects and other objects which he created unable to be edited.

Open nepella opened this issue 3 years ago • 2 comments

For a model which uses the TrackedCreator concern to be valid, it must have a valid creator. But, when a user is deleted, his associated objects are not reassigned, so an attempt to update any of them will fail. (The API returns HTTP 422.)

A simple solution is to make TrackedCreator's creator field optional, but this seems to violate the intended design (example) and may create worse problems.

To repeat

  1. As an administrator, create a user with the project creator role.
  2. As that user, create a project.
  3. As an administrator, delete the new user.
  4. As an administrator, attempt to change the new project's title.

nepella avatar Jul 07 '21 22:07 nepella

Thanks @nepella — good catch. We'll come up with a solution. I think making the dependency optional is probably the right solution (or deactivating rather than deleting the user). We don't use this creator association in many places, so it shouldn't be difficult to adjust the expectation.

zdavis avatar Jul 07 '21 22:07 zdavis

Thank you for taking the time to report this bug. We've reviewed the issue and agree that this should be fixed. We’re adding a “planned” label to indicate that we consider this bug as part of our current work plan.

This was an automated message, but please don't hesitate to reply. Our team watches these issues closely and will respond as soon as we're able to!

zdavis avatar Jul 07 '21 22:07 zdavis

This should be resolved as part of #3685

zdavis avatar Nov 29 '23 17:11 zdavis