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

Struct querier

coderd/database/dbauthz/dbauthz.go:112–117  ·  view source on GitHub ↗

querier is a wrapper around the database store that performs authorization checks before returning data. All querier methods expect an authorization subject present in the context. If no subject is present, most methods will fail. Use WithAuthorizeContext to set the authorization subject in the con

Source from the content-addressed store, hash-verified

110// Use WithAuthorizeContext to set the authorization subject in the context for
111// the common user case.
112type querier struct {
113 db database.Store
114 auth rbac.Authorizer
115 log slog.Logger
116 acs *atomic.Pointer[AccessControlStore]
117}
118
119func New(db database.Store, authorizer rbac.Authorizer, logger slog.Logger, acs *atomic.Pointer[AccessControlStore]) database.Store {
120 // If the underlying db store is already a querier, return it.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected