mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 21:24:35 -04:00
Restrict API access for free/unpaid accounts
This commit is contained in:
parent
075fe7a5e5
commit
d0be8f744c
@ -42,6 +42,16 @@ class TokenAuth
|
|||||||
return response()->json($error, 403);
|
return response()->json($error, 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Ninja::isHosted() && $company_token->is_system == 0 && !$user->account->isPaid()){
|
||||||
|
|
||||||
|
$error = [
|
||||||
|
'message' => 'Feature not available with free / unpaid account.',
|
||||||
|
'errors' => new stdClass,
|
||||||
|
];
|
||||||
|
|
||||||
|
return response()->json($error, 403);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
|
||||||
| Necessary evil here: As we are authenticating on CompanyToken,
|
| Necessary evil here: As we are authenticating on CompanyToken,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user