mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Allow to delete users while keeping log entries.
This commit is contained in:
parent
dae4e38256
commit
a0f934169c
4 changed files with 102 additions and 14 deletions
|
@ -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+"})
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue