fixed request signed print and pdf..

This commit is contained in:
Cüneyt Şentürk 2021-06-30 18:11:49 +03:00
parent 5388e30579
commit c168153023

View File

@ -13,6 +13,15 @@ class PaymentShow extends FormRequest
*/ */
public function authorize() public function authorize()
{ {
if (auth()->guest()) {
return true;
}
// Allow admin to see signed invoice
if (user()->can('read-sales-revenues')) {
return true;
}
return $this->payment->contact_id == user()->contact->id; return $this->payment->contact_id == user()->contact->id;
} }