diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index bff39fbf18..d5f1dbd582 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -139,6 +139,10 @@ class AuthServiceProvider extends ServiceProvider return $user->hasAccess('self.edit_location'); }); + Gate::define('self.checkout_assets', function($user) { + return $user->hasAccess('self.checkout_assets'); + }); + Gate::define('backend.interact', function ($user) { return $user->can('view', Statuslabel::class) || $user->can('view', AssetModel::class) diff --git a/config/permissions.php b/config/permissions.php index 2950391808..0550886167 100644 --- a/config/permissions.php +++ b/config/permissions.php @@ -578,6 +578,13 @@ return array( 'display' => true, ), + array( + 'permission' => 'self.checkout_assets', + 'label' => 'Self-Checkout', + 'note' => 'This user may check out assets that are marked for self-checkout.', + 'display' => true, + ), + ),