Fixes for key login

This commit is contained in:
David Bomba 2022-02-28 07:45:42 +11:00
parent a3e89ddf21
commit 4b3e09faf8
3 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,7 @@ class ContactHashLoginController extends Controller
return render('generic.error', ['title' => session()->get('title'), 'notification' => session()->get('notification')]);
}
private function setRedirectPath()
private function setRedirectPath()
{
if(auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES)

View File

@ -123,6 +123,8 @@ class ContactKeyLogin
return redirect($this->setRedirectPath());
}
}
//28-02-2022 middleware should not allow this to progress as we should have redirected by this stage.
abort(404, "Unable to authenticate.");
return $next($request);
}

View File

@ -46,6 +46,9 @@ class SetInviteDb
if($entity == "pay")
$entity = "invoice";
if(!in_array($entity, ['invoice','quote','credit','recurring_invoice']))
abort(404,'I could not find this resource.');
/* Try and determine the DB from the invitation key STRING*/
if (config('ninja.db.multi_db_enabled')) {