mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Added components checkout gate
This commit is contained in:
parent
0e28f36678
commit
a8f79369ee
|
@ -255,6 +255,12 @@ class AuthServiceProvider extends ServiceProvider
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$gate->define('components.checkout', function ($user) {
|
||||||
|
if (($user->hasAccess('components.checkout')) || ($user->hasAccess('admin'))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Checks for some level of management
|
// Checks for some level of management
|
||||||
$gate->define('components.manage', function ($user) {
|
$gate->define('components.manage', function ($user) {
|
||||||
if (($user->hasAccess('components.edit')) || ($user->hasAccess('components.delete')) || ($user->hasAccess('components.checkout')) || ($user->hasAccess('admin'))) {
|
if (($user->hasAccess('components.edit')) || ($user->hasAccess('components.delete')) || ($user->hasAccess('components.checkout')) || ($user->hasAccess('admin'))) {
|
||||||
|
|
Loading…
Reference in a new issue