Repository navigation
Feat/admin audit logging #3076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GhassenKefi
wants to merge
7
commits into
master
Choose a base branch
from
feat/admin-audit-logging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,697
−5
Open
Feat/admin audit logging #3076
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7a25572
feat(teams): log team lifecycle and settings to the audit log
GhassenKefi 9363515
feat(members): log team membership changes to the audit log
GhassenKefi bbfb587
feat(federation): log remote instance trust changes to the audit log
GhassenKefi 65d61f4
feat(settings): log Teams admin settings to the audit log
GhassenKefi 6201f62
Update lib/AuditLog/Operation.php
GhassenKefi 24b3e79
Update lib/AuditLog/Operation.php
GhassenKefi 93c96bd
Update lib/AuditLog/Operation.php
GhassenKefi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Circles\AuditLog; | ||
|
|
||
| /** | ||
| * Operations Teams writes to the admin audit log, in the form `app.entity.action` | ||
| * | ||
| * The values are matched by log consumers (filters, alert rules, SIEM imports), | ||
| * so changing one is a breaking change for them. Case names may be renamed. | ||
| */ | ||
| enum Operation: string { | ||
| case TeamCreated = 'circles.team.created'; | ||
| case TeamDeleted = 'circles.team.deleted'; | ||
| case TeamRenamed = 'circles.team.renamed'; | ||
| case TeamConfigUpdated = 'circles.team_config.updated'; | ||
| case TeamSettingUpdated = 'circles.team_setting.updated'; | ||
| case InvitationCreated = 'circles.invitation.created'; | ||
| case InvitationRevoked = 'circles.invitation.revoked'; | ||
| case MemberAdded = 'circles.member.added'; | ||
| case MemberInvited = 'circles.member.invited'; | ||
| case MemberRemoved = 'circles.member.removed'; | ||
| case MemberLevelUpdated = 'circles.member_level.updated'; | ||
| case MemberJoined = 'circles.member.joined'; | ||
| case MemberRequested = 'circles.member.requested'; | ||
| case MemberLeft = 'circles.member.left'; | ||
| case RemoteInstanceAdded = 'circles.remote_instance.added'; | ||
| case RemoteInstanceUpdated = 'circles.remote_instance.updated'; | ||
| case RemoteInstanceRemoved = 'circles.remote_instance.removed'; | ||
| case ScimInstanceAdded = 'circles.scim_instance.added'; | ||
| case ScimInstanceRemoved = 'circles.scim_instance.removed'; | ||
| case ConfigUpdated = 'circles.config.updated'; | ||
|
|
||
| /** | ||
| * Short description of when the operation is logged, used for the documentation | ||
| */ | ||
| public function description(): string { | ||
| return match ($this) { | ||
| self::TeamCreated => 'A team was created', | ||
| self::TeamDeleted => 'A team was deleted', | ||
| self::TeamRenamed => 'A team was renamed', | ||
| self::TeamConfigUpdated => 'The configuration flags of a team (open, invite only, visible, federated, ...) were changed', | ||
| self::TeamSettingUpdated => 'A setting of a team, for example the password of its shares, was set or removed', | ||
| self::InvitationCreated => 'An invitation link to join a team was created', | ||
| self::InvitationRevoked => 'The invitation link to join a team was revoked', | ||
| self::MemberAdded => 'A member was added to a team, or a request to join it was accepted', | ||
| self::MemberInvited => 'A user, group or team was invited to join an invite only team', | ||
| self::MemberRemoved => 'A member was removed from a team', | ||
| self::MemberLevelUpdated => 'The level of a member of a team (member, moderator, admin, owner) was changed, including ownership transfers', | ||
| self::MemberJoined => 'A user joined an open team, through an invitation link or by accepting an invitation', | ||
| self::MemberRequested => 'A user requested to join a team that requires confirmation', | ||
| self::MemberLeft => 'A member left a team', | ||
| self::RemoteInstanceAdded => 'A remote instance was added for federated teams, with the type defining how much it is trusted', | ||
| self::RemoteInstanceUpdated => 'The identity or the type of a known remote instance for federated teams was changed', | ||
| self::RemoteInstanceRemoved => 'A remote instance for federated teams was removed', | ||
| self::ScimInstanceAdded => 'A remote instance was allowed to add members to teams managed by SCIM', | ||
| self::ScimInstanceRemoved => 'A remote instance was no longer allowed to add members to teams managed by SCIM', | ||
| self::ConfigUpdated => 'An admin setting of Teams (federated teams, frontal address, team folder quotas) was changed', | ||
| }; | ||
| } | ||
| } |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.