mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Add condition in LicenseCheckinController:bulkCheckin method to evaluate if the license is reassignable
This commit is contained in:
parent
d393bd5c97
commit
6161a0d76d
|
@ -128,6 +128,13 @@ class LicenseCheckinController extends Controller
|
|||
$license = License::findOrFail($licenseId);
|
||||
$this->authorize('checkin', $license);
|
||||
|
||||
if (! $license->reassignable) {
|
||||
// Not allowed to checkin
|
||||
Session::flash('error', 'License not reassignable.');
|
||||
|
||||
return redirect()->back()->withInput();
|
||||
}
|
||||
|
||||
$licenseSeatsByUser = LicenseSeat::where('license_id', '=', $licenseId)
|
||||
->whereNotNull('assigned_to')
|
||||
->with('user')
|
||||
|
|
Loading…
Reference in a new issue