diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 2a0851d1e4..056d3eb5f0 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -179,12 +179,18 @@ class AuthServiceProvider extends ServiceProvider // to the logged in API user, but creating assets, licenses, etc won't work // if the user can't view and interact with the select lists. Gate::define('view.selectlists', function ($user) { - return $user->can('view', Asset::class) - || $user->can('view', License::class) - || $user->can('view', Component::class) - || $user->can('view', Consumable::class) - || $user->can('view', Accessory::class) - || $user->can('view', User::class); + return $user->can('update', Asset::class) + || $user->can('create', License::class) + || $user->can('update', License::class) + || $user->can('create', License::class) + || $user->can('update', Component::class) + || $user->can('create', Component::class) + || $user->can('update', Consumable::class) + || $user->can('create', Consumable::class) + || $user->can('update', Accessory::class) + || $user->can('create', Accessory::class) + || $user->can('update', User::class) + || $user->can('create', User::class); }); } }