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

Method UpsertChatDiffStatusReference

coderd/database/dbauthz/dbauthz.go:8078–8088  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpsertChatDiffStatusReferenceParams)

Source from the content-addressed store, hash-verified

8076}
8077
8078func (q *querier) UpsertChatDiffStatusReference(ctx context.Context, arg database.UpsertChatDiffStatusReferenceParams) (database.ChatDiffStatus, error) {
8079 // Authorize update on the parent chat.
8080 chat, err := q.db.GetChatByID(ctx, arg.ChatID)
8081 if err != nil {
8082 return database.ChatDiffStatus{}, err
8083 }
8084 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
8085 return database.ChatDiffStatus{}, err
8086 }
8087 return q.db.UpsertChatDiffStatusReference(ctx, arg)
8088}
8089
8090func (q *querier) UpsertChatExploreModelOverride(ctx context.Context, value string) error {
8091 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceDeploymentConfig); err != nil {

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65

Tested by

no test coverage detected