Fixed bug where assets could be deleted without being checked back in [ch38]

This commit is contained in:
snipe 2019-01-22 14:13:30 -08:00
parent 66f557d436
commit 07eead2dbf

View file

@ -120,7 +120,7 @@ class AssetsTransformer
'clone' => Gate::allows('create', Asset::class) ? true : false,
'restore' => false,
'update' => (bool) Gate::allows('update', Asset::class),
'delete' => (bool) Gate::allows('delete', Asset::class),
'delete' => ($asset->assigned_to=='' && Gate::allows('delete', Asset::class) ? true : false),
];
if ($asset->deleted_at!='') {