mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Added self-checkout permission option
This commit is contained in:
parent
771265113e
commit
e4f6aefdad
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue