fix(auth): correct Gate usage for customer permissions

Updated the Gate check to use forUser method for proper customer context.
This commit is contained in:
Jérémy Munsch 2026-11-14 23:00:44 +01:00
parent 3426ea22a9
commit 8c484ae053
No known key found for this signature in database
GPG key ID: 2AAECDA6B7330F91

View file

@ -58,6 +58,6 @@ class SendMissingOrderReminderJob implements ShouldQueue
{
$customer = $employee->customer;
return $customer && Gate::check('customerPassOrders', $customer);
return $customer && Gate::forUser($customer)->check('customerPassOrders');
}
}