msgid "Dedicated Bconsole config"
msgstr "Dedicated Bconsole config"
+
+msgid "Audit log:"
+msgstr "Audit log:"
msgid "Dedicated Bconsole config"
msgstr "Dedykowana konfiguracja Bconsole"
+
+msgid "Audit log:"
+msgstr "Audit log:"
msgid "Dedicated Bconsole config"
msgstr "Configuração do Bconsole dedicado"
+
+msgid "Audit log:"
+msgstr "Audit log:"
msgid "Dedicated Bconsole config"
msgstr "Выделенная Bconsole"
+
+msgid "Audit log:"
+msgstr "Audit log:"
$config = $this->getModule('api_config')->getConfig('api');
+ Logging::$audit_enabled = (!key_exists('audit_log', $config) || $config['audit_log'] == 1);
Logging::$debug_enabled = (key_exists('debug', $config) && $config['debug'] == 1);
if ($this->authenticate() === false) {
</com:TActiveDropDownList>
</div>
</div>
+ <div class="w3-row w3-section">
+ <div class="w3-col w3-quarter"><com:TLabel ForControl="GeneralAuditLog" Text="<%[ Audit log: ]%>" /></div>
+ <div class="w3-col w3-threequarter">
+ <com:TActiveCheckBox
+ ID="GeneralAuditLog"
+ CssClass="w3-check"
+ />
+ </div>
+ </div>
<div class="w3-row w3-section">
<div class="w3-col w3-quarter"><com:TLabel ForControl="GeneralDebug" Text="<%[ Debug: ]%>" /></div>
<div class="w3-col w3-threequarter">
return;
}
$this->GeneralLang->SelectedValue= $this->config['api']['lang'];
+ // NOTE: Default audit log is enabled
+ $this->GeneralAuditLog->Checked = (!key_exists('audit_log', $this->config['api']) || $this->config['api']['audit_log'] == 1);
$this->GeneralDebug->Checked = ($this->config['api']['debug'] == 1);
}
$reload_page = true;
}
$this->config['api']['lang'] = $this->GeneralLang->SelectedValue;
+ $this->config['api']['audit_log'] = $this->GeneralAuditLog->Checked ? 1 : 0;
$this->config['api']['debug'] = $this->GeneralDebug->Checked ? 1 : 0;
$this->getModule('api_config')->setConfig($this->config);
if ($reload_page) {
*/
public static $debug_enabled = false;
+ /*
+ * Stores audit enable state.
+ * Default audit log is enabled.
+ *
+ * @var bool
+ */
+ public static $audit_enabled = true;
+
/**
* Log categories.
*/
*/
private function isEnabled($category) {
$is_enabled = false;
- if (self::$debug_enabled === true || $category === self::CATEGORY_AUDIT) {
+ if ((self::$debug_enabled === true && $category !== self::CATEGORY_AUDIT) || (self::$audit_enabled === true && $category === self::CATEGORY_AUDIT)) {
// NOTE: Audit log is written always, it is not possible to disable it
$is_enabled = true;
}