mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-20 12:24:29 +02:00
Merge pull request #3091 from Icinga/fix/disable-stacktraces
Fix that disabled stack straces via user prefs had no effect
This commit is contained in:
commit
3d50729847
@ -423,6 +423,21 @@ class Web extends EmbeddedWeb
|
|||||||
$user = $auth->getUser();
|
$user = $auth->getUser();
|
||||||
$this->getRequest()->setUser($user);
|
$this->getRequest()->setUser($user);
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
|
|
||||||
|
if ($user->can('application/stacktraces')) {
|
||||||
|
$displayExceptions = $this->user->getPreferences()->getValue(
|
||||||
|
'icingaweb',
|
||||||
|
'show_stacktraces'
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($displayExceptions !== null) {
|
||||||
|
$this->frontController->setParams(
|
||||||
|
array(
|
||||||
|
'displayExceptions' => $displayExceptions
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -462,13 +477,6 @@ class Web extends EmbeddedWeb
|
|||||||
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
|
$this->frontController->setControllerDirectory($this->getApplicationDir('/controllers'));
|
||||||
|
|
||||||
$displayExceptions = $this->config->get('global', 'show_stacktraces', true);
|
$displayExceptions = $this->config->get('global', 'show_stacktraces', true);
|
||||||
if ($this->user !== null && $this->user->can('application/stacktraces')) {
|
|
||||||
$displayExceptions = $this->user->getPreferences()->getValue(
|
|
||||||
'icingaweb',
|
|
||||||
'show_stacktraces',
|
|
||||||
$displayExceptions
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->frontController->setParams(
|
$this->frontController->setParams(
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user