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

Method GetUserChatCustomPrompt

coderd/database/dbauthz/dbauthz.go:4630–4639  ·  view source on GitHub ↗
(ctx context.Context, userID uuid.UUID)

Source from the content-addressed store, hash-verified

4628}
4629
4630func (q *querier) GetUserChatCustomPrompt(ctx context.Context, userID uuid.UUID) (string, error) {
4631 u, err := q.db.GetUserByID(ctx, userID)
4632 if err != nil {
4633 return "", err
4634 }
4635 if err := q.authorizeContext(ctx, policy.ActionReadPersonal, u); err != nil {
4636 return "", err
4637 }
4638 return q.db.GetUserChatCustomPrompt(ctx, userID)
4639}
4640
4641func (q *querier) GetUserChatDebugLoggingEnabled(ctx context.Context, userID uuid.UUID) (bool, error) {
4642 u, err := q.db.GetUserByID(ctx, userID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65

Tested by

no test coverage detected