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

Method AutoArchiveInactiveChats

coderd/database/dbauthz/dbauthz.go:1655–1663  ·  view source on GitHub ↗
(ctx context.Context, arg database.AutoArchiveInactiveChatsParams)

Source from the content-addressed store, hash-verified

1653}
1654
1655func (q *querier) AutoArchiveInactiveChats(ctx context.Context, arg database.AutoArchiveInactiveChatsParams) ([]database.AutoArchiveInactiveChatsRow, error) {
1656 // Background write by dbpurge. The LATERAL read of chat_messages rows
1657 // happens below the RBAC boundary; only the chat row itself requires
1658 // authorization.
1659 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceChat); err != nil {
1660 return nil, err
1661 }
1662 return q.db.AutoArchiveInactiveChats(ctx, arg)
1663}
1664
1665func (q *querier) BackfillChatModelConfigProvider(ctx context.Context, arg database.BackfillChatModelConfigProviderParams) (sql.Result, error) {
1666 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceDeploymentConfig); err != nil {

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected