1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Make sure we force at least one of auth methods

This commit is contained in:
Benjamin Beganović 2024-03-21 16:19:35 +01:00
parent 706133bd7b
commit db391d96c5

View File

@ -49,6 +49,15 @@ class StepService
}
}
$auth = collect($dependencies)
->filter(fn ($dependency) => str_starts_with($dependency['id'], 'auth.'))
->keys()
->toArray();
if (count(array_intersect($auth, $steps)) === 0) {
$errors[] = ctrans('texts.step_authentication_fail');
}
return $errors;
}