Added self-checkout permission option

This commit is contained in:
snipe 2018-08-21 23:26:12 -07:00
parent 771265113e
commit e4f6aefdad
2 changed files with 11 additions and 0 deletions

View file

@ -139,6 +139,10 @@ class AuthServiceProvider extends ServiceProvider
return $user->hasAccess('self.edit_location'); 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) { Gate::define('backend.interact', function ($user) {
return $user->can('view', Statuslabel::class) return $user->can('view', Statuslabel::class)
|| $user->can('view', AssetModel::class) || $user->can('view', AssetModel::class)

View file

@ -578,6 +578,13 @@ return array(
'display' => true, '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,
),
), ),