MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / requireAccountUser

Method requireAccountUser

internal/httpapi/scope.go:41–47  ·  view source on GitHub ↗

requireAccountUser is the user-returning convenience over requireAccountScope for the many account-admin handlers that only need user.ID — a clean drop-in for requireUser on operations the agent tier must not reach.

(ctx context.Context)

Source from the content-addressed store, hash-verified

39// for the many account-admin handlers that only need user.ID — a clean drop-in
40// for requireUser on operations the agent tier must not reach.
41func (s *Server) requireAccountUser(ctx context.Context) (*identity.User, error) {
42 p, err := s.requireAccountScope(ctx)
43 if err != nil {
44 return nil, err
45 }
46 return p.User, nil
47}
48
49// requireAgentAccess authenticates the caller and confirms it may act as
50// agentID. Account-scoped credentials may act as any agent they own (ownership

Callers 15

handleExportUserDataMethod · 0.95
handleDeleteAccountMethod · 0.95
handleCreateAgentMethod · 0.95
handleTestWebhookMethod · 0.95
handleUpdateWebhookMethod · 0.95
handleCreateWebhookMethod · 0.95
handleListWebhooksMethod · 0.95
handleGetWebhookMethod · 0.95

Calls 1

requireAccountScopeMethod · 0.95

Tested by

no test coverage detected