DirectorActivityLog: avoid User access on CLI

This commit is contained in:
Thomas Gelf 2015-11-06 09:39:14 +01:00
parent 0db5a43d24
commit 775cf0104e
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@ use Icinga\Module\Director\Data\Db\DbObject;
use Icinga\Module\Director\Db;
use Icinga\Module\Director\Util;
use Icinga\Authentication\Auth;
use Icinga\Application\Icinga;
class DirectorActivityLog extends DbObject
{
@ -30,6 +31,9 @@ class DirectorActivityLog extends DbObject
protected static function username()
{
if (Icinga::app()->isCli()) {
return 'cli';
}
$auth = Auth::getInstance();
if ($auth->isAuthenticated()) {