fix: force password reset on invited accounts

This commit is contained in:
Andras Bacsai 2023-10-26 20:45:38 +02:00
parent 52d6fb51d5
commit 928345c8ea
2 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class DecideWhatToDoWithUser
public function handle(Request $request, Closure $next): Response
{
if (!auth()->user() || !isCloud() || isInstanceAdmin()) {
if (!isCloud() && showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
if (!isCloud() && showBoarding() && !in_array($request->path(), allowedPathsForBoardingAccounts())) {
return redirect('boarding');
}
return $next($request);

View File

@ -148,6 +148,8 @@ function allowedPathsForInvalidAccounts() {
return [
'logout',
'verify',
'force-password-reset',
'livewire/message/force-password-reset',
'livewire/message/verify-email',
'livewire/message/help'
];