mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fixes for subscriptions - ensure client authentication is against correct company
This commit is contained in:
parent
43d9773fae
commit
a0ae3061c1
@ -24,6 +24,12 @@ class SubscriptionPurchaseController extends Controller
|
||||
{
|
||||
public function index(Subscription $subscription, Request $request)
|
||||
{
|
||||
/* Make sure the contact is logged into the correct company for this subscription */
|
||||
if(auth()->guard('contact')->user() && auth()->guard('contact')->user()->company_id != $subscription->company_id){
|
||||
auth()->guard('contact')->logout();
|
||||
$request->session()->invalidate();
|
||||
}
|
||||
|
||||
if ($request->has('locale')) {
|
||||
$this->setLocale($request->query('locale'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user