djangocms-history icon indicating copy to clipboard operation
djangocms-history copied to clipboard

cannot delete user

Open florianschieder opened this issue 7 months ago • 0 comments

django cms users cannot be deleted if there are related PlaceholderOperation objects:

  • there is a restriction that prevents this at admin-site level (djangocms_history/admin.py)
  • there is a direct foreign key relation (see djangocms_history/models.py, PlaceholderOperation.user) to django.contrib.auth.User which causes the deletion to fail with "there is no permission to delete the placeholder operation"

In my opinion this should be resolved (as there should generally be no showstoppers to delete stale accounts) by either

  • deleting related placeholder operations when deleting a user
  • or resolving the relation to django.contrib.auth.User differently, e.g. similarly as django-cms does in the page model where the created_by field is just the username and no direct foreign key

florianschieder avatar Jul 12 '24 08:07 florianschieder