From 5299b3e9f066e1779312798ecb150786152cf254 Mon Sep 17 00:00:00 2001 From: Marcus Moore Date: Thu, 12 Sep 2024 13:29:44 -0700 Subject: [PATCH] Remove code handled by CompanyableChildTrait --- app/Http/Controllers/Api/AssetMaintenancesController.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/Http/Controllers/Api/AssetMaintenancesController.php b/app/Http/Controllers/Api/AssetMaintenancesController.php index ac247a8873..e12dc826a9 100644 --- a/app/Http/Controllers/Api/AssetMaintenancesController.php +++ b/app/Http/Controllers/Api/AssetMaintenancesController.php @@ -188,10 +188,6 @@ class AssetMaintenancesController extends Controller // Check if the asset maintenance exists $assetMaintenance = AssetMaintenance::findOrFail($assetMaintenanceId); - if (! Company::isCurrentUserHasAccess($assetMaintenance->asset)) { - return response()->json(Helper::formatStandardApiResponse('error', null, 'You cannot delete a maintenance for that asset')); - } - $assetMaintenance->delete(); return response()->json(Helper::formatStandardApiResponse('success', $assetMaintenance, trans('admin/asset_maintenances/message.delete.success')));