diff options
| author | Simon Rettberg | 2025-05-22 16:07:03 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2025-05-22 16:07:03 +0200 |
| commit | 19160ec62cec3b6e436590b16ebb2b329ef5d55b (patch) | |
| tree | bdfc8a89829fde79133b839d4cb52a27c7b3e520 /modules-available/main/install.inc.php | |
| parent | [locationinfo] URLpanel: Browser accept-language and screen rotation (diff) | |
| download | slx-admin-19160ec62cec3b6e436590b16ebb2b329ef5d55b.tar.gz slx-admin-19160ec62cec3b6e436590b16ebb2b329ef5d55b.tar.xz slx-admin-19160ec62cec3b6e436590b16ebb2b329ef5d55b.zip | |
Add audit logging of POST actions
Diffstat (limited to 'modules-available/main/install.inc.php')
| -rw-r--r-- | modules-available/main/install.inc.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules-available/main/install.inc.php b/modules-available/main/install.inc.php index 69c0da8f..d5ce1992 100644 --- a/modules-available/main/install.inc.php +++ b/modules-available/main/install.inc.php @@ -87,6 +87,18 @@ $res[] = tableCreate('mail_config', " PRIMARY KEY (`configid`) "); +$res[] = tableCreate('audit', " + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `dateline` int(10) unsigned NOT NULL, + `userid` int(10) unsigned NULL, + `ipaddr` varchar(50) NOT NULL, + `module` varchar(100) NOT NULL, + `action` varchar(100) NOT NULL, + `data` mediumblob NOT NULL, + `response` smallint(3) unsigned DEFAULT NULL, + PRIMARY KEY (`id`) +"); + // Update path // ####################### @@ -153,6 +165,9 @@ if ($someUser !== false && (int)$someUser['userid'] !== 1) { $res[] = tableAddConstraint('mail_queue', 'configid', 'mail_config', 'configid', 'ON UPDATE CASCADE ON DELETE CASCADE'); +$res[] = tableAddConstraint('audit', 'userid', 'user', 'userid', + 'ON UPDATE CASCADE ON DELETE SET NULL'); + // Create response for browser if (in_array(UPDATE_DONE, $res)) { |
