Fixes for quote form request
This commit is contained in:
parent
7885813c1a
commit
646091f89e
2 changed files with 2 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ class ShowInvoiceRequest extends Request
|
|||
*/
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class ShowQuoteRequest extends FormRequest
|
|||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue