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

Function WorkspaceRBACFromContext

coderd/database/dbauthz/workspace_rbac_context.go:38–41  ·  view source on GitHub ↗

WorkspaceRBACFromContext attempts to retrieve the workspace RBAC object from context.

(ctx context.Context)

Source from the content-addressed store, hash-verified

36
37// WorkspaceRBACFromContext attempts to retrieve the workspace RBAC object from context.
38func WorkspaceRBACFromContext(ctx context.Context) (rbac.Object, bool) {
39 obj, ok := ctx.Value(workspaceRBACContextKey{}).(rbac.Object)
40 return obj, ok
41}

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected