Add integration activity types to codes.go (#1293)

New activity types for integration creation, update, and deletion have been added to the activity codes. This ensures the tracking of these user activities relating to integrations, which were not previously being logged.
This commit is contained in:
Bethuel Mmbaga 2023-11-07 14:05:58 +03:00 committed by GitHub
parent 9b1a0c2df7
commit 125a7a9daf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,12 @@ const (
PeerLoginExpired PeerLoginExpired
// DashboardLogin indicates that the user logged in to the dashboard // DashboardLogin indicates that the user logged in to the dashboard
DashboardLogin DashboardLogin
// IntegrationCreated indicates that the user created an integration
IntegrationCreated
// IntegrationUpdated indicates that the user updated an integration
IntegrationUpdated
// IntegrationDeleted indicates that the user deleted an integration
IntegrationDeleted
) )
var activityMap = map[Activity]Code{ var activityMap = map[Activity]Code{
@ -169,6 +175,9 @@ var activityMap = map[Activity]Code{
UserLoggedInPeer: {"User logged in peer", "user.peer.login"}, UserLoggedInPeer: {"User logged in peer", "user.peer.login"},
PeerLoginExpired: {"Peer login expired", "peer.login.expire"}, PeerLoginExpired: {"Peer login expired", "peer.login.expire"},
DashboardLogin: {"Dashboard login", "dashboard.login"}, DashboardLogin: {"Dashboard login", "dashboard.login"},
IntegrationCreated: {"Integration created", "integration.create"},
IntegrationUpdated: {"Integration updated", "integration.update"},
IntegrationDeleted: {"Integration deleted", "integration.delete"},
} }
// StringCode returns a string code of the activity // StringCode returns a string code of the activity