mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(audit): auditing token addition and removal (#6649)
* auditing tokens * adding diffs for token auditing * added test * generating docs * auditing owner field
This commit is contained in:
+3
-2
@@ -254,9 +254,10 @@ func auditLogDescription(alog database.GetAuditLogsOffsetRow) string {
|
||||
codersdk.AuditAction(alog.Action).Friendly(),
|
||||
)
|
||||
|
||||
// API Key resources do not have targets and follow the below format:
|
||||
// API Key resources (used for authentication) do not have targets and follow the below format:
|
||||
// "User {logged in | logged out}"
|
||||
if alog.ResourceType == database.ResourceTypeApiKey {
|
||||
if alog.ResourceType == database.ResourceTypeApiKey &&
|
||||
(alog.Action == database.AuditActionLogin || alog.Action == database.AuditActionLogout) {
|
||||
return str
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user