Change check on debugbar to use debug not environment

This commit is contained in:
Dane Everitt 2018-03-10 12:03:23 -06:00
parent dfb002fb33
commit ef371a508d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
* Fixes a UI error when attempting to change the default Nest and Egg for an existing server. * Fixes a UI error when attempting to change the default Nest and Egg for an existing server.
* Correct permissions check in UI to allow subusers with permission to `view-allocations` the ability to actually see the sidebar link. * Correct permissions check in UI to allow subusers with permission to `view-allocations` the ability to actually see the sidebar link.
* Fixes improper behavior when marking an egg as copying the configuration from another. * Fixes improper behavior when marking an egg as copying the configuration from another.
* Debug bar is only checked when the app is set to debug mode in the API session handler, rather than when it is in local mode to match the plugin settings.
### Changed ### Changed
* Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline. * Panel now throws proper 504: Gateway Timeout errors on server listing when daemon is offline.

View file

@ -41,7 +41,7 @@ class SetSessionDriver
*/ */
public function handle(Request $request, Closure $next) public function handle(Request $request, Closure $next)
{ {
if ($this->app->environment() !== 'production') { if ($this->config->get('app.debug')) {
$this->app->make(LaravelDebugbar::class)->disable(); $this->app->make(LaravelDebugbar::class)->disable();
} }