diff --git a/app/Providers/TelescopeServiceProvider.php b/app/Providers/TelescopeServiceProvider.php index bbd1ebe..384309c 100644 --- a/app/Providers/TelescopeServiceProvider.php +++ b/app/Providers/TelescopeServiceProvider.php @@ -15,20 +15,18 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider public function register(): void { // Telescope::night(); // Modo oscuro opcional - + $this->hideSensitiveRequestDetails(); - $isProduction = $this->app->environment('production'); - + $isProduction = $this->app->environment('production'); + Telescope::filter(function (IncomingEntry $entry) use ($isProduction) { - return !$isProduction || // Permite en desarrollo - auth()->check() && in_array(auth()->user()->rol->nombre, ['administrador', 'super']) || + return !$isProduction || // Permite en desarrollo $entry->isReportableException() || $entry->isFailedRequest() || $entry->isFailedJob() || $entry->isScheduledTask() || $entry->hasMonitoredTag(); }); - } /**