mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-05 20:35:31 +00:00
Fix access control - https://huntr.dev/bounties/19453ef1-4d77-4cff-b7e8-1bc8f3af0862/
This commit is contained in:
@ -269,6 +269,7 @@ class AssetModelsController extends Controller
|
||||
*/
|
||||
public function getClone($modelId = null)
|
||||
{
|
||||
$this->authorize('view', 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'));
|
||||
|
||||
Reference in New Issue
Block a user