Merge pull request #10406 from Haxatron/fix-access-control

security fix
This commit is contained in:
snipe 2021-12-09 11:23:35 -08:00 committed by GitHub
commit cf5e3da3a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,6 +269,7 @@ class AssetModelsController extends Controller
*/
public function getClone($modelId = null)
{
$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'));