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

Method ResolveUserChatSpendLimit

coderd/database/dbauthz/dbauthz.go:6387–6392  ·  view source on GitHub ↗
(ctx context.Context, arg database.ResolveUserChatSpendLimitParams)

Source from the content-addressed store, hash-verified

6385}
6386
6387func (q *querier) ResolveUserChatSpendLimit(ctx context.Context, arg database.ResolveUserChatSpendLimitParams) (database.ResolveUserChatSpendLimitRow, error) {
6388 if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceChat.WithOwner(arg.UserID.String())); err != nil {
6389 return database.ResolveUserChatSpendLimitRow{}, err
6390 }
6391 return q.db.ResolveUserChatSpendLimit(ctx, arg)
6392}
6393
6394func (q *querier) RevokeDBCryptKey(ctx context.Context, activeKeyDigest string) error {
6395 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected