DirectorActivityLog: avoid User access on CLI
This commit is contained in:
parent
0db5a43d24
commit
775cf0104e
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue