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

Method UpsertUserChatDebugLoggingEnabled

coderd/database/dbauthz/dbauthz.go:8347–8356  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpsertUserChatDebugLoggingEnabledParams)

Source from the content-addressed store, hash-verified

8345}
8346
8347func (q *querier) UpsertUserChatDebugLoggingEnabled(ctx context.Context, arg database.UpsertUserChatDebugLoggingEnabledParams) error {
8348 u, err := q.db.GetUserByID(ctx, arg.UserID)
8349 if err != nil {
8350 return err
8351 }
8352 if err := q.authorizeContext(ctx, policy.ActionUpdatePersonal, u); err != nil {
8353 return err
8354 }
8355 return q.db.UpsertUserChatDebugLoggingEnabled(ctx, arg)
8356}
8357
8358func (q *querier) UpsertUserChatPersonalModelOverride(ctx context.Context, arg database.UpsertUserChatPersonalModelOverrideParams) error {
8359 u, err := q.db.GetUserByID(ctx, arg.UserID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65

Tested by

no test coverage detected