Remove leftover testing logic and fix checkout permissions

Removed console logs and temporary testing code from the bootstrap-table view. Updated the transformer to correctly check checkout permissions against the Asset class instead of PredefinedKit.
This commit is contained in:
spencerrlongg
2024-12-17 16:06:10 -06:00
parent 72f58b0405
commit eb054897d6
2 changed files with 3 additions and 5 deletions
@@ -3,6 +3,8 @@
namespace App\Http\Transformers;
use App\Helpers\Helper;
use App\Models\Asset;
use App\Models\AssetModel;
use App\Models\PredefinedKit;
use App\Models\SnipeModel;
use Illuminate\Support\Facades\Gate;
@@ -42,7 +44,7 @@ class PredefinedKitsTransformer
$permissions_array['available_actions'] = [
'update' => Gate::allows('update', PredefinedKit::class),
'delete' => Gate::allows('delete', PredefinedKit::class),
'checkout' => Gate::allows('checkout', PredefinedKit::class),
'checkout' => Gate::allows('checkout', Asset::class),
// 'clone' => Gate::allows('create', PredefinedKit::class),
// 'restore' => Gate::allows('create', PredefinedKit::class),
];