Added permission on restore

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-04-25 08:09:16 -07:00
parent 6e7f0728fd
commit 66ce02fc48

View file

@ -337,6 +337,7 @@ class BulkAssetsController extends Controller
} }
public function restore(Request $request) { public function restore(Request $request) {
$this->authorize('update', Asset::class);
$assetIds = $request->get('ids'); $assetIds = $request->get('ids');
if (empty($assetIds)) { if (empty($assetIds)) {
return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated')); return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated'));