Repository navigation
feat: expand audit logging - #3125
Merged
Merged
Conversation
samin-z
reviewed
Oct 20, 2026
| public function log(string $message, array $context): void { | ||
| $auditEvent = new CriticalActionPerformedEvent($message, $context); | ||
| public function log(Operation $operation, string $message, array $parameters = []): void { | ||
| $auditEvent = new CriticalActionPerformedEvent($message, $parameters, false, $operation->value); |
Contributor
There was a problem hiding this comment.
the operation name is passed as a forth argument to CriticalActionPerformedEvent, the argument exists only since NC 36, on 33-35 the constructor takes three arguments, so this causes a break. tables main still runs on those versions.
samin-z
previously requested changes
Oct 20, 2026
GhassenKefi
force-pushed
the
feat/admin-audit-logging
branch
from
October 20, 2026 15:46
d5f5dba to
eb0194f
Compare
blizzz
force-pushed
the
feat/admin-audit-logging
branch
from
October 23, 2026 11:20
eb0194f to
21a895a
Compare
blizzz
reviewed
Oct 23, 2026
blizzz
left a comment
Member
There was a problem hiding this comment.
Thank for the PR! Please consider my comments inline.
…tries The audit log entries for deleted tables, views and rows and for transferred tables and applications now carry an operation and named parameters, with the messages unchanged. The operations are collected in the new OCA\Tables\AuditLog\Operation enum, with a short description of each for the documentation, and AuditLogServiceInterface::log() now takes the operation. The entries only carry IDs and user IDs. The full table, view and row were passed as parameters before, which put the cell values of deleted rows into the audit log. A table transfer now logs the previous owner as fromUserId instead of the user doing the transfer, which was empty when run through occ. The application transfer entry now also names the previous owner, and goes through the audit log service like the other entries. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
Creating a share of a table, view or application (with a user, group, team, remote user or by public link), changing the permissions of a share and deleting a share are now written to the admin audit log. Tables shares are not core shares, so admin_audit did not see them. Deleting a share through the share review skips the manage permission check and is logged with its own message. Receiving a federated share from another server and entering a wrong password for a password protected public link share are logged too, the latter through the authFailed() hook of AuthPublicShareController. When the sharing server changes the permissions of a received federated share, the new permissions are logged as well. The share token and password are never logged. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
…e audit log Creating a table (from the web interface, the API, occ tables:add or a template), archiving and unarchiving it, and deleting a column are now written to the admin audit log. Deleting a column removes its values from every row, so it is logged like a deletion. Columns removed together with their table are not logged separately, as the table deletion is already logged. Tables imported through the user migration are the user's own data and are not logged. Other table updates (title, emoji, description, sorting) are not logged. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
Creating a view and changing its filter, columns or view settings are now written to the admin audit log. These settings decide which rows and columns the people the view is shared with can see, so the entry lists which of them changed. Changes to the title, emoji, description, sorting or layout of a view are not logged. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
Creating, updating and deleting an application (context) are now written to the admin audit log. Adding a table or view to an application exposes it to everyone the application is shared with, so the update entry lists the added and removed nodes and the nodes whose permissions in the application changed, and the create entry lists the nodes the application starts with. Deleting an application also deletes its pages and shares. The name, icon and description of an application are not logged. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
Importing rows from a spreadsheet into a table or view is now written to the admin audit log, for both the current import (including the background job) and the legacy API endpoints. Only the number of inserted and updated rows, created columns and errors is logged, never the imported values. Failed imports are not logged. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ghassen kefi <ghassen.kefi.dev@gmail.com>
GhassenKefi
force-pushed
the
feat/admin-audit-logging
branch
from
October 26, 2026 14:11
21a895a to
e794295
Compare
blizzz
approved these changes
Oct 27, 2026
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.
🖼️ Screenshots
🏁 Checklist
/backport to stableX.X🤖 AI (if applicable)