feat: soft-delete for teamer accounts

addresses #869dv9br3
This commit is contained in:
Björn Fromme committed 2026-08-11 12:26:13 +02:00
1 parent 388ecf9603
commit d654ce77fb
45 files changed
+1151 -7

No files matched your search

@@ -9,6 +9,8 @@ class Application extends Constraint
{
public string $message = 'Diese Bewerbung überlappt sich mit einem deiner bestätigten Einsätze';
public string $deletedMessage = 'Für einen gelöschten Account können keine Bewerbungen angelegt werden';
public function getTargets(): array|string
{
return static::CLASS_CONSTRAINT;
@@ -21,6 +21,18 @@ class ApplicationValidator extends ConstraintValidator
$teamer = $application->getTeamer();
// a deleted teamer is excluded from every process, so no new application may be
// created for them - not even by an admin acting on their behalf
if (true === $teamer->isDeleted()) {
$this
->context
->buildViolation($constraint->deletedMessage)
->addViolation()
;
return;
}
if (true === $teamer->isAllowOverlappingApplications()) {
return;
}