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

Method UpdateUserSecretByUserIDAndName

coderd/database/dbauthz/dbauthz.go:7572–7578  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateUserSecretByUserIDAndNameParams)

Source from the content-addressed store, hash-verified

7570}
7571
7572func (q *querier) UpdateUserSecretByUserIDAndName(ctx context.Context, arg database.UpdateUserSecretByUserIDAndNameParams) (database.UserSecret, error) {
7573 obj := rbac.ResourceUserSecret.WithOwner(arg.UserID.String())
7574 if err := q.authorizeContext(ctx, policy.ActionUpdate, obj); err != nil {
7575 return database.UserSecret{}, err
7576 }
7577 return q.db.UpdateUserSecretByUserIDAndName(ctx, arg)
7578}
7579
7580func (q *querier) UpdateUserShellToolDisplayMode(ctx context.Context, arg database.UpdateUserShellToolDisplayModeParams) (string, error) {
7581 user, err := q.db.GetUserByID(ctx, arg.UserID)

Callers

nothing calls this directly

Calls 4

authorizeContextMethod · 0.95
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected