Allow to delete users while keeping log entries.

This commit is contained in:
Jan Böhmer 2022-12-17 00:25:54 +01:00
parent dae4e38256
commit a0f934169c
4 changed files with 102 additions and 14 deletions

View file

@ -157,18 +157,6 @@ class UserController extends AdminPages\BaseAdminController
return $this->_new($request, $em, $importer, $entity);
}
protected function deleteCheck(AbstractNamedDBElement $entity): bool
{
if ($entity instanceof User) {
//TODO: Find a better solution
$this->addFlash('error', 'Currently it is not possible to delete a user, as this would break the log... This will be implemented later...');
return false;
}
return true;
}
/**
* @Route("/{id}", name="user_delete", methods={"DELETE"}, requirements={"id"="\d+"})
*/