Fix authorization check in AssetsController

Removed incorrect and commented-out authorization check in the destroy method. Ensured proper authorization by explicitly authorizing the asset instance before attempting deletion.
This commit is contained in:
spencerrlongg 2024-11-26 14:49:50 -06:00
parent e056da6b2a
commit ac1d09add0

View file

@ -673,8 +673,6 @@ class AssetsController extends Controller
*/
public function destroy(Asset $asset): JsonResponse
{
//this is probably wrong
//$this->authorize('delete', Asset::class);
$this->authorize('delete', $asset);
try {
DestroyAssetAction::run($asset);