mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Added checkout to permissions check
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
c0ef27fc9e
commit
c52faaf23d
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers\Kits;
|
|||
use App\Http\Controllers\CheckInOutRequest;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PredefinedKit;
|
||||
use App\Models\Asset;
|
||||
use App\Models\PredefinedLicence;
|
||||
use App\Models\PredefinedModel;
|
||||
use App\Models\User;
|
||||
|
|
|
@ -83,6 +83,18 @@ abstract class SnipePermissionsPolicy
|
|||
return $user->hasAccess($this->columnName().'.edit');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the accessory.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function checkout(User $user, $item = null)
|
||||
{
|
||||
return $user->hasAccess($this->columnName().'.checkout');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the accessory.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue