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

Function wrapDBAuthz

coderd/jobreaper/detector_test.go:796–803  ·  view source on GitHub ↗

wrapDBAuthz adds our Authorization/RBAC around the given database store, to ensure the reaper has the right permissions to do its work.

(db database.Store, logger slog.Logger)

Source from the content-addressed store, hash-verified

794// wrapDBAuthz adds our Authorization/RBAC around the given database store, to
795// ensure the reaper has the right permissions to do its work.
796func wrapDBAuthz(db database.Store, logger slog.Logger) database.Store {
797 return dbauthz.New(
798 db,
799 rbac.NewStrictCachingAuthorizer(prometheus.NewRegistry()),
800 logger,
801 coderdtest.AccessControlStorePointer(),
802 )
803}

Callers 1

newDetectorTestEnvFunction · 0.85

Calls 3

NewFunction · 0.92

Tested by

no test coverage detected