commit compras1 2811
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-28 07:11:35 +02:00
parent d58b75c87a
commit eb32c74c56
202 changed files with 17463 additions and 1526 deletions
+4 -1
View File
@@ -51,7 +51,10 @@ class WarehouseWorkdesk
$query = WarehouseRequest::query();
if (! $actor->hasFunctions(['admin', 'warehouse_request_read']) && ! ($actor->hasFunctions(['warehouse_request_deliver']) && $actor->hasFunctions(['warehouse']))) {
$query->where(function ($q) use ($actor) {
$q->where('created_by', $actor->id);
$q->whereRaw('1 = 0');
if ($actor->hasFunctions(['warehouse_request_prepare'])) {
$q->orWhere('created_by', $actor->id);
}
if ($actor->hasFunctions(['warehouse_request_review']) && $actor->department_id !== null) {
$q->orWhere('snapshot->requester->department_id', $actor->department_id);
}