mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge isTrusted fix
This commit is contained in:
parent
35860e6156
commit
edc944a122
@ -206,11 +206,9 @@ class InvoiceApiController extends BaseAPIController
|
||||
$invoice = $recurringInvoice;
|
||||
}
|
||||
$reminder = isset($data['email_type']) ? $data['email_type'] : false;
|
||||
if (auth()->user()->isTrusted()) {
|
||||
$this->dispatch(new SendInvoiceEmail($invoice, auth()->user()->id, $reminder));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$invoice = Invoice::scope($invoice->public_id)
|
||||
->with('client', 'invoice_items', 'invitations')
|
||||
@ -339,10 +337,6 @@ class InvoiceApiController extends BaseAPIController
|
||||
|
||||
public function emailInvoice(InvoiceRequest $request)
|
||||
{
|
||||
if (! auth()->user()->isTrusted()) {
|
||||
return $this->errorResponse('Requires paid pro plan', 400);
|
||||
}
|
||||
|
||||
$invoice = $request->entity();
|
||||
|
||||
if ($invoice->is_recurring && $recurringInvoice = $this->invoiceRepo->createRecurringInvoice($invoice)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user