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

Method LinkChatFiles

coderd/database/dbauthz/dbauthz.go:6095–6104  ·  view source on GitHub ↗
(ctx context.Context, arg database.LinkChatFilesParams)

Source from the content-addressed store, hash-verified

6093}
6094
6095func (q *querier) LinkChatFiles(ctx context.Context, arg database.LinkChatFilesParams) (int32, error) {
6096 chat, err := q.db.GetChatByID(ctx, arg.ChatID)
6097 if err != nil {
6098 return 0, err
6099 }
6100 if err := q.authorizeContext(ctx, policy.ActionUpdate, chat); err != nil {
6101 return 0, err
6102 }
6103 return q.db.LinkChatFiles(ctx, arg)
6104}
6105
6106func (q *querier) ListAIBridgeClients(ctx context.Context, arg database.ListAIBridgeClientsParams) ([]string, error) {
6107 prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceAibridgeInterception.Type)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetChatByIDMethod · 0.65
LinkChatFilesMethod · 0.65

Tested by

no test coverage detected