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

Method FailSystemObjectChecks

coderd/database/dbauthz/setup_test.go:484–491  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

482}
483
484func (m *expects) FailSystemObjectChecks() *expects {
485 return m.WithSuccessAuthorizer(func(ctx context.Context, subject rbac.Subject, action policy.Action, obj rbac.Object) error {
486 if obj.Type == rbac.ResourceSystem.Type {
487 return xerrors.Errorf("hard coded system authz failed")
488 }
489 return nil
490 })
491}
492
493// WithSuccessAuthorizer is helpful when an optimization authz check is made
494// to skip some RBAC checks. This check in testing would prevent the ability

Callers 3

TestGroupMethod · 0.80
TestOrganizationMethod · 0.80
TestWorkspaceMethod · 0.80

Calls 2

WithSuccessAuthorizerMethod · 0.95
ErrorfMethod · 0.45

Tested by

no test coverage detected