Added checkout to permissions check

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-05-11 19:02:23 -07:00
parent c0ef27fc9e
commit c52faaf23d
2 changed files with 13 additions and 0 deletions

View file

@ -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;

View file

@ -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.
*