Enable audit debugging only when logged as another user (Bug #3109),

fix default of kolab_auth_auditlog in sample config file
This commit is contained in:
Aleksander Machniak 2014-06-02 14:02:31 +02:00
parent 2ce61e7fc1
commit 26767a1669
2 changed files with 3 additions and 4 deletions

View file

@ -34,7 +34,7 @@ $rcmail_config['kolab_auth_admin_login'] = '';
$rcmail_config['kolab_auth_admin_password'] = '';
// Enable audit logging for abuse of administrative privileges.
$rcmail_config['kolab_auth_auditlog'] = true;
$rcmail_config['kolab_auth_auditlog'] = false;
// Role field (from fieldmap configuration)
$rcmail_config['kolab_auth_role'] = 'role';

View file

@ -61,9 +61,8 @@ class kolab_auth extends rcube_plugin
$this->add_hook('write_log', array($this, 'write_log'));
$this->username = $_SESSION['username'];
// Enable debug logs per-user, this enables logging only after
// user has logged in
if (!empty($_SESSION['username']) && $rcmail->config->get('kolab_auth_auditlog')) {
// Enable debug logs (per-user), when logged as another user
if (!empty($_SESSION['kolab_auth_admin']) && $rcmail->config->get('kolab_auth_auditlog')) {
$rcmail->config->set('debug_level', 1);
$rcmail->config->set('devel_mode', true);
$rcmail->config->set('smtp_log', true);