Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: enforce orgid in audit logs where required #12283

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

Merged
merged 4 commits into from
Feb 26, 2024
Merged
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
Prev Previous commit
Next Next commit
Fix lint
  • Loading branch information
Emyrk committed Feb 23, 2024
commit af7f056b4ec2cb0f66923c669be257ab8f1cda3d
2 changes: 1 addition & 1 deletion coderd/audit/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ func BackgroundAudit[T Auditable](ctx context.Context, p *BackgroundAuditParams[

if ResourceRequiresOrgID[T]() && p.OrganizationID == uuid.Nil {
// We panic as this is a developer error and should never happen.
panic(fmt.Sprintf("missing required organization ID for resource %s", either(p.Old, p.New, ResourceType[T], p.Action))
panic(fmt.Sprintf("missing required organization ID for resource %s", either(p.Old, p.New, ResourceType[T], p.Action)))
}

auditLog := database.AuditLog{
Expand Down