From 919cbc463b6832bbf1fca447ed0f16b148157a78 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Mon, 3 Jan 2022 10:12:29 +0800 Subject: [PATCH] set users list allowed to see original packing measurements --- app/Http/Resources/PackingListResource.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Resources/PackingListResource.php b/app/Http/Resources/PackingListResource.php index b1355331..e5d5ac93 100644 --- a/app/Http/Resources/PackingListResource.php +++ b/app/Http/Resources/PackingListResource.php @@ -20,7 +20,7 @@ class PackingListResource extends JsonResource $packages = $replica ? $replica->packages : $this->packages; - if(Auth()->user()->type === RoleTypes::SHADOW_ADMIN) { + if(in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) || in_array(Auth()->user()->id, [1914, 1915])) { $packages = $this->packages; }