Added nicer formatting for fields in log meta
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
@@ -3,6 +3,7 @@ namespace App\Http\Transformers;
|
||||
|
||||
use App\Helpers\Helper;
|
||||
use App\Models\Actionlog;
|
||||
use App\Models\Asset;
|
||||
use App\Models\CustomField;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Company;
|
||||
@@ -12,6 +13,7 @@ use App\Models\AssetModel;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Contracts\Encryption\DecryptException;
|
||||
use Illuminate\Support\Facades\Crypt;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
class ActionlogsTransformer
|
||||
{
|
||||
@@ -98,6 +100,12 @@ class ActionlogsTransformer
|
||||
\Log::debug('custom fields do not match');
|
||||
$clean_meta[$fieldname]['old'] = "************";
|
||||
$clean_meta[$fieldname]['new'] = "************";
|
||||
|
||||
if (Gate::allows('admin')) {
|
||||
$clean_meta[$fieldname]['old'] = unserialize($enc_old);
|
||||
$clean_meta[$fieldname]['new'] = unserialize($enc_new);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user