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

Struct mockPreparedAuthorizer

coderd/rbac/authz_internal_test.go:1452–1457  ·  view source on GitHub ↗

fakePreparedAuthorizer is the prepared version of a FakeAuthorizer. It will return the same error as the original FakeAuthorizer.

Source from the content-addressed store, hash-verified

1450// fakePreparedAuthorizer is the prepared version of a FakeAuthorizer. It will
1451// return the same error as the original FakeAuthorizer.
1452type mockPreparedAuthorizer struct {
1453 sync.RWMutex
1454 Original *MockAuthorizer
1455 Subject Subject
1456 Action policy.Action
1457}
1458
1459func (f *mockPreparedAuthorizer) Authorize(ctx context.Context, object Object) error {
1460 return f.Original.Authorize(ctx, f.Subject, f.Action, object)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected