3x1io / filament-themes

FrontEnd Themes Manager For Filament Admin
https://github.com/3x1io/filament-themes
MIT License
33 stars 8 forks source link

Missing policy for view_themes #8

Closed howdu closed 1 year ago

howdu commented 1 year ago

auth()->user()->can('view_themes') is always turning false.

shankhadevpadam commented 1 year ago

One quick solution is to define a gate inside AuthServiceProvider.php

 Gate::define('view_themes', function (\App\Models\User $user) {
      return $user->isAdmin();
  });
howdu commented 1 year ago

Thanks we went with a different solution so unable to test that now.