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

Method Authorize

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

Authorize will authorize the given subject to perform the given action on the given object. Authorize is pure and deterministic with respect to its arguments and the surrounding object.

(ctx context.Context, subject Subject, action policy.Action, object Object)

Source from the content-addressed store, hash-verified

198 // on the given object. Authorize is pure and deterministic with respect to
199 // its arguments and the surrounding object.
200 Authorize(ctx context.Context, subject Subject, action policy.Action, object Object) error
201 Prepare(ctx context.Context, subject Subject, action policy.Action, objectType string) (PreparedAuthorized, error)
202}
203

Callers 15

TestFilterFunction · 0.95
testAuthorizeFunction · 0.95
AuthorizeTunnelMethod · 0.65
chatStartWorkspaceMethod · 0.65
chatStopWorkspaceMethod · 0.65
AuthorizeMethod · 0.65
AuthorizeMethod · 0.65
AuthorizeContextMethod · 0.65
checkAuthorizationMethod · 0.65
assertRBACNoLockMethod · 0.65
AcquireMethod · 0.65

Implementers 7

mockAuthorizercoderd/workspaceupdates_test.go
RecordingAuthorizercoderd/coderdtest/authorize.go
FakeAuthorizercoderd/coderdtest/authorize.go
MockAuthorizercoderd/rbac/authz_internal_test.go
RegoAuthorizercoderd/rbac/authz.go
authCachecoderd/rbac/authz.go
authRecordercoderd/rbac/authz.go

Calls

no outgoing calls

Tested by 13

TestFilterFunction · 0.76
testAuthorizeFunction · 0.76
fuzzAuthzPrepFunction · 0.52
fuzzAuthzFunction · 0.52
BenchmarkRBACAuthorizeFunction · 0.52
BenchmarkCacherFunction · 0.52
TestCacheFunction · 0.52
TestOwnerExecFunction · 0.52
TestRolePermissionsFunction · 0.52
AuthorizeMethod · 0.52