mirror of
https://github.com/coder/coder.git
synced 2025-07-06 15:41:45 +00:00
chore: update Audit docs to include Audit Actions (#5887)
* chore: update Audit docs to include Audit Actions * regenerated audit docs * adjusted check_enterprise_imports.sh * PR feedback * changing script back for now as CI faiiling
This commit is contained in:
@ -117,7 +117,14 @@ func updateAuditDoc(doc []byte, auditableResourcesMap AuditableResourcesMap) ([]
|
||||
buffer.WriteString("|--|-----------------|\n")
|
||||
|
||||
for _, resourceName := range sortedResourceNames {
|
||||
buffer.WriteString("|" + resourceName + "|<table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody>")
|
||||
// Create a string of audit actions for each resource
|
||||
var auditActions []string
|
||||
for _, action := range audit.AuditActionMap[resourceName] {
|
||||
auditActions = append(auditActions, string(action))
|
||||
}
|
||||
auditActionsString := strings.Join(auditActions, ", ")
|
||||
|
||||
buffer.WriteString("|" + resourceName + "<br><i>" + auditActionsString + "</i>|<table><thead><tr><th>Field</th><th>Tracked</th></tr></thead><tbody>")
|
||||
|
||||
// We must sort the field names to ensure sub-table ordering
|
||||
sortedFieldNames := sortKeys(auditableResourcesMap[resourceName])
|
||||
|
Reference in New Issue
Block a user