Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chore: removing unaudited resources
  • Loading branch information
Kira-Pilot committed Jan 26, 2023
commit bc6a271b70bde1180101b4f072e31f9e8781e1ee
2 changes: 0 additions & 2 deletions coderd/audit/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import (
// AuditableResources, then add it to this interface.
type Auditable interface {
database.APIKey |
database.Organization |
database.OrganizationMember |
database.Template |
database.TemplateVersion |
database.User |
Expand Down
6 changes: 0 additions & 6 deletions coderd/audit/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ type BuildAuditParams[T Auditable] struct {

func ResourceTarget[T Auditable](tgt T) string {
switch typed := any(tgt).(type) {
case database.Organization:
return typed.Name
case database.Template:
return typed.Name
case database.TemplateVersion:
Expand All @@ -73,8 +71,6 @@ func ResourceTarget[T Auditable](tgt T) string {

func ResourceID[T Auditable](tgt T) uuid.UUID {
switch typed := any(tgt).(type) {
case database.Organization:
return typed.ID
case database.Template:
return typed.ID
case database.TemplateVersion:
Expand All @@ -96,8 +92,6 @@ func ResourceID[T Auditable](tgt T) uuid.UUID {

func ResourceType[T Auditable](tgt T) database.ResourceType {
switch any(tgt).(type) {
case database.Organization:
return database.ResourceTypeOrganization
case database.Template:
return database.ResourceTypeTemplate
case database.TemplateVersion:
Expand Down
14 changes: 0 additions & 14 deletions enterprise/audit/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@ var AuditableResources = auditMap(map[any]map[string]Action{
"private_key": ActionSecret, // We don't want to expose private keys in diffs.
"public_key": ActionTrack, // Public keys are ok to expose in a diff.
},
&database.OrganizationMember{}: {
"user_id": ActionTrack,
"organization_id": ActionTrack,
"created_at": ActionIgnore, // Never changes, but is implicit and not helpful in a diff.
"updated_at": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
"roles": ActionTrack,
},
&database.Organization{}: {
"id": ActionTrack,
"name": ActionTrack,
"description": ActionTrack,
"created_at": ActionIgnore, // Never changes, but is implicit and not helpful in a diff.
"updated_at": ActionIgnore, // Changes, but is implicit and not helpful in a diff.
},
&database.Template{}: {
"id": ActionTrack,
"created_at": ActionIgnore, // Never changes, but is implicit and not helpful in a diff.
Expand Down