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

Method UpdateEncryptedUserAIProviderKey

coderd/database/dbauthz/dbauthz.go:6884–6892  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateEncryptedUserAIProviderKeyParams)

Source from the content-addressed store, hash-verified

6882}
6883
6884func (q *querier) UpdateEncryptedUserAIProviderKey(ctx context.Context, arg database.UpdateEncryptedUserAIProviderKeyParams) (database.UserAiProviderKey, error) {
6885 // Encrypted user-owned provider keys can be rewritten on any row so
6886 // dbcrypt rotation can move every key to a new digest. This is a
6887 // maintenance path, not the self-service user key API.
6888 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceAIProvider); err != nil {
6889 return database.UserAiProviderKey{}, err
6890 }
6891 return q.db.UpdateEncryptedUserAIProviderKey(ctx, arg)
6892}
6893
6894func (q *querier) UpdateExternalAuthLink(ctx context.Context, arg database.UpdateExternalAuthLinkParams) (database.ExternalAuthLink, error) {
6895 fetch := func(ctx context.Context, arg database.UpdateExternalAuthLinkParams) (database.ExternalAuthLink, error) {

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected