Add audit log cleanup/retention period to cron

Audit logs will be automatically cleaned up after 90 days (new installs) or 7 years (existing installs). This is configurable in Settings > Security.
This commit is contained in:
Marcus Hill
2024-06-30 11:51:39 +01:00
parent cc38c642c5
commit 8db9822f63
7 changed files with 36 additions and 10 deletions

View File

@@ -43,6 +43,16 @@ require_once "inc_all_admin.php";
</div>
</div>
<div class="form-group">
<label>Log retention <small class="text-secondary">(The amount of days before audit logs are deleted during nightly cron)</small></label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-clock"></i></span>
</div>
<input type="number" class="form-control" name="config_log_retention" placeholder="Enter days to retain" value="<?php echo intval($config_log_retention); ?>">
</div>
</div>
<hr>
<button type="submit" name="edit_security_settings" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Save</button>