MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetUserFromContext

Function GetUserFromContext

backend/api/v1/common.go:416–419  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

414}
415
416func GetUserFromContext(ctx context.Context) (*store.UserMessage, bool) {
417 user, ok := ctx.Value(common.UserContextKey).(*store.UserMessage)
418 return user, ok
419}

Callers 15

SetupSampleMethod · 0.85
CreateRolloutMethod · 0.85
BatchRunTasksMethod · 0.85
BatchSkipTasksMethod · 0.85
BatchCancelTaskRunsMethod · 0.85
CreateReleaseMethod · 0.85
preCheckAccessMethod · 0.85
SearchQueryHistoriesMethod · 0.85
GetQueryHistoryMethod · 0.85
getUserMethod · 0.85
SearchProjectsMethod · 0.85
CreateProjectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected