MCPcopy Index your code
hub / github.com/coder/coder / PreparedRecorder

Struct PreparedRecorder

coderd/coderdtest/authorize.go:337–345  ·  view source on GitHub ↗

PreparedRecorder is the prepared version of the RecordingAuthorizer. It records the Authorize() calls to the original recorder. If the caller uses CompileToSQL, all recording stops. This is to support parity between memory and SQL backed dbs.

Source from the content-addressed store, hash-verified

335// uses CompileToSQL, all recording stops. This is to support parity between
336// memory and SQL backed dbs.
337type PreparedRecorder struct {
338 rec *RecordingAuthorizer
339 prepped rbac.PreparedAuthorized
340 subject rbac.Subject
341 action policy.Action
342
343 rw sync.Mutex
344 usingSQL bool
345}
346
347func (s *PreparedRecorder) Authorize(ctx context.Context, object rbac.Object) error {
348 s.rw.Lock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected