Update TelescopeServiceProvider.php
This commit is contained in:
@@ -53,7 +53,8 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
|
||||
protected function gate(): void
|
||||
{
|
||||
Gate::define('viewTelescope', function ($user) {
|
||||
return $user && in_array($user->rol->nombre, ['administrador', 'super']);
|
||||
return auth()->check() && (auth()->user()->rol->nombre === "administrador" || auth()->user()->rol->nombre === "super");
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user