Repository navigation
feat: audit logging - #1607
Merged
Merged
feat: audit logging#1607
Conversation
Changing a Recognize setting through SettingsService::setSetting (the admin settings page) now writes a `recognize.setting.changed` entry with the setting key, the new value and the previous value. The values are booleans, numbers and binary paths; none of them are secrets. The binary paths (node, ffmpeg) are executed by the app, so their new value is part of the entry. Only actual changes are logged: the admin page re-submits every setting on each save, so writing an unchanged value produces no entry. Progress state that the background jobs write through the same method (*.status, *.lastFile, clusterFaces.lastRun) is not configuration and is not logged. Settings changed with occ config:app:set bypass this service and are covered by the occ command line entry admin_audit writes itself. All entries are built by AuditEventFactory, which passes the operation only to servers whose CriticalActionPerformedEvent supports it. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…t log Resetting data of all users now writes an audit entry: - recognize.classifications.reset: TagManager::resetClassifications removed the Recognize classification tags from all files (admin page "reset tags", occ recognize:reset-tags), with the number of files. - recognize.face_clusters.deleted_all: FaceClusterMapper::deleteAll deleted every face cluster (admin page "reset faces", occ recognize:reset-faces, occ recognize:reset-face-clusters), with the number of deleted rows. - recognize.face_detections.deleted_all: FaceDetectionMapper::deleteAll deleted every face detection (admin page "reset faces", occ recognize:reset-faces), with the number of deleted rows. The admin controller and the occ commands call the mappers directly, so the mappers are the one place that covers every entry point. Resetting faces therefore writes one entry per table. Nothing is logged when there was nothing to delete or when the deletion failed. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
… log The occ commands that delete system tags now write an audit entry: - recognize.empty_tags.deleted: TagManager::removeEmptyTags (occ recognize:cleanup-tags) deleted every system tag that is assigned to no file. This includes tags created by admins or other apps, not only Recognize's. - recognize.legacy_tags.deleted: TagManager::removeTags (occ recognize:remove-legacy-tags) deleted the tags of old Recognize versions. Both entries carry the number of deleted tags and their IDs. Tag names are not logged. admin_audit logs the creation of system tags but not their deletion, and the occ command line alone does not show which tags were removed. One entry is written per command run, only after all deletions succeeded and only if at least one tag was deleted. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…t log Clearing all queues and scheduling a recrawl now writes an audit entry: - recognize.queues.cleared: QueueService::clearAllJobs emptied every queue and removed all scheduled Recognize background jobs (admin page, occ recognize:clear-background-jobs). - recognize.recrawl.scheduled: QueueService::scheduleRecrawl did the same and scheduled a new crawl of all files (admin page, occ recognize:recrawl). Both entries carry the number of removed queue entries. A recrawl writes only its own entry, not an additional one for the clearing. The admin controller and both occ commands repeated the same list of queues and jobs; they now call these two service methods, so every entry point writes the same entry once and only after all steps succeeded. This also makes occ recognize:clear-background-jobs remove the face clustering job, as the admin page and the recrawl already did. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Marcel Klehr <mklehr@gmx.net>
marcelklehr
force-pushed
the
feat/admin-audit-logging
branch
from
November 4, 2026 13:51
3dbd2b7 to
c99718d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI (if applicable)