mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-29 20:04:21 +00:00
Don’t let the user checkout an asset to itself
(We should consolidate that AssetCheckoutRequest for the API)
This commit is contained in:
@ -458,7 +458,7 @@ class AssetsController extends Controller
|
||||
if (request('assigned_user')) {
|
||||
$target = User::find(request('assigned_user'));
|
||||
} elseif (request('assigned_asset')) {
|
||||
$target = Asset::find(request('assigned_asset'));
|
||||
$target = Asset::where('id','!=',$assetId)->find(request('assigned_asset'));
|
||||
} elseif (request('assigned_location')) {
|
||||
$target = Location::find(request('assigned_location'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user