mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 12:44:35 -04:00
Fixes for quote form request
This commit is contained in:
parent
7885813c1a
commit
646091f89e
@ -23,7 +23,7 @@ class ShowInvoiceRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->guard('contact')->user()->client_id === $this->invoice->client_id
|
return auth()->guard('contact')->user()->client_id === (int)$this->invoice->client_id
|
||||||
&& auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
|
&& auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_INVOICES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ class ShowQuoteRequest extends FormRequest
|
|||||||
{
|
{
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return auth()->guard('contact')->user()->client->id === $this->quote->client_id
|
return auth()->guard('contact')->user()->client->id === (int)$this->quote->client_id
|
||||||
&& auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES;
|
&& auth()->guard('contact')->user()->company->enabled_modules & PortalComposer::MODULE_QUOTES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user