mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
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:
parent
e056da6b2a
commit
ac1d09add0
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue