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

Function NewStrictAuthorizer

coderd/rbac/authz.go:324–328  ·  view source on GitHub ↗

NewStrictAuthorizer is for testing only. It skips the caching layer, which is useful when every authorize call is unique (0% cache hit rate) and the cache overhead dominates.

(registry prometheus.Registerer)

Source from the content-addressed store, hash-verified

322// which is useful when every authorize call is unique (0% cache hit
323// rate) and the cache overhead dominates.
324func NewStrictAuthorizer(registry prometheus.Registerer) Authorizer {
325 auth := NewAuthorizer(registry)
326 auth.strict = true
327 return auth
328}
329
330func NewAuthorizer(registry prometheus.Registerer) *RegoAuthorizer {
331 queryOnce.Do(func() {

Callers 6

TestRolePermissionsFunction · 0.92
TestSeedFromBytesFunction · 0.92
TestAISeatsHeartbeatFunction · 0.92
authzSetupFunction · 0.92
TestSeatTrackerDBFunction · 0.92

Calls 1

NewAuthorizerFunction · 0.85

Tested by 6

TestRolePermissionsFunction · 0.74
TestSeedFromBytesFunction · 0.74
TestAISeatsHeartbeatFunction · 0.74
authzSetupFunction · 0.74
TestSeatTrackerDBFunction · 0.74