Update AssetModelsController.php

This commit is contained in:
Haxatron 2021-12-09 21:42:18 +08:00 committed by GitHub
parent 918e7c8dae
commit 1699c09758
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,7 +269,7 @@ class AssetModelsController extends Controller
*/
public function getClone($modelId = null)
{
$this->authorize('view', AssetModel::class);
$this->authorize('create', AssetModel::class);
// Check if the model exists
if (is_null($model_to_clone = AssetModel::find($modelId))) {
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));