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:
parent
706133bd7b
commit
db391d96c5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user