Added components checkout gate

This commit is contained in:
snipe 2016-09-07 01:15:14 -07:00
parent 0e28f36678
commit a8f79369ee

View file

@ -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'))) {