Display an error message when enabled modules cannot be read because /etc/icingaweb2 is not readable

resolves #9141
This commit is contained in:
Alexander A. Klimov 2015-04-22 16:44:00 +02:00
parent d3964a31fb
commit 9393d11c0b
1 changed files with 10 additions and 0 deletions

View File

@ -101,6 +101,16 @@ class Manager
*/
private function detectEnabledModules()
{
if (false === file_exists($parent = dirname($this->enableDir))) {
return;
}
if (false === is_readable($parent)) {
throw new NotReadableError(
'Cannot read enabled modules. Module directory\'s parent directory "%s" is not readable',
$parent
);
}
if (! file_exists($this->enableDir)) {
return;
}