From a19cef07bff79322021012a945bc1d3ec1614792 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 5 Dec 2017 16:26:23 -0800 Subject: [PATCH] Check for gate on license key display --- app/Http/Transformers/LicensesTransformer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Transformers/LicensesTransformer.php b/app/Http/Transformers/LicensesTransformer.php index e96a9ed849..5cf5c7c477 100644 --- a/app/Http/Transformers/LicensesTransformer.php +++ b/app/Http/Transformers/LicensesTransformer.php @@ -25,7 +25,7 @@ class LicensesTransformer 'name' => e($license->name), 'company' => ($license->company) ? ['id' => (int) $license->company->id,'name'=> e($license->company->name)] : null, 'manufacturer' => ($license->manufacturer) ? ['id' => (int) $license->manufacturer->id,'name'=> e($license->manufacturer->name)] : null, - 'product_key' => e($license->serial), + 'product_key' => (Gate::allows('viewKeys', License::class)) ? e($license->serial) : '------------', 'order_number' => e($license->order_number), 'purchase_order' => e($license->purchase_order), 'purchase_date' => Helper::getFormattedDateObject($license->purchase_date, 'date'),