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)
| 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. |
| 41 | func (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 |
no test coverage detected