diff --git a/app/Http/Controllers/Kits/CheckoutKitController.php b/app/Http/Controllers/Kits/CheckoutKitController.php index 0d99560751..4452d9cc34 100644 --- a/app/Http/Controllers/Kits/CheckoutKitController.php +++ b/app/Http/Controllers/Kits/CheckoutKitController.php @@ -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; diff --git a/app/Policies/SnipePermissionsPolicy.php b/app/Policies/SnipePermissionsPolicy.php index 435828fd14..979fc85359 100644 --- a/app/Policies/SnipePermissionsPolicy.php +++ b/app/Policies/SnipePermissionsPolicy.php @@ -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. * diff --git a/config/permissions.php b/config/permissions.php index 0176dc13ba..2dbe34b2c1 100644 --- a/config/permissions.php +++ b/config/permissions.php @@ -292,13 +292,6 @@ return array( 'note' => '', 'display' => true, ), - - array( - 'permission' => 'kits.checkout', - 'label' => 'Checkout ', - 'note' => '', - 'display' => true, - ), ),