Skip to content

Commit c2c12ae

Browse files
committed
Comment out audit logs that do nothing
1 parent 0115053 commit c2c12ae

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

enterprise/coderd/workspaceproxy.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -410,21 +410,22 @@ func (api *API) workspaceProxyIssueSignedAppToken(rw http.ResponseWriter, r *htt
410410
// @x-apidocgen {"skip": true}
411411
func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request) {
412412
var (
413-
ctx = r.Context()
414-
proxy = httpmw.WorkspaceProxy(r)
415-
auditor = api.AGPL.Auditor.Load()
413+
ctx = r.Context()
414+
proxy = httpmw.WorkspaceProxy(r)
416415
// TODO: This audit log does not work because it has no user id
417416
// associated with it. The audit log commitAudit() function ignores
418-
// the audit log if there is no user id.
419-
aReq, commitAudit = audit.InitRequest[database.WorkspaceProxy](rw, &audit.RequestParams{
420-
Audit: *auditor,
421-
Log: api.Logger,
422-
Request: r,
423-
Action: database.AuditActionWrite,
424-
})
417+
// the audit log if there is no user id. We should find a solution
418+
// to make sure this event is tracked.
419+
//auditor = api.AGPL.Auditor.Load()
420+
//aReq, commitAudit = audit.InitRequest[database.WorkspaceProxy](rw, &audit.RequestParams{
421+
// Audit: *auditor,
422+
// Log: api.Logger,
423+
// Request: r,
424+
// Action: database.AuditActionWrite,
425+
//})
425426
)
426-
aReq.Old = proxy
427-
defer commitAudit()
427+
//aReq.Old = proxy
428+
//defer commitAudit()
428429

429430
var req wsproxysdk.RegisterWorkspaceProxyRequest
430431
if !httpapi.Read(ctx, rw, r, &req) {
@@ -463,7 +464,7 @@ func (api *API) workspaceProxyRegister(rw http.ResponseWriter, r *http.Request)
463464
return
464465
}
465466

466-
aReq.New = updatedProxy
467+
//aReq.New = updatedProxy
467468
httpapi.Write(ctx, rw, http.StatusCreated, wsproxysdk.RegisterWorkspaceProxyResponse{
468469
AppSecurityKey: api.AppSecurityKey.String(),
469470
})

0 commit comments

Comments
 (0)