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

Method DeleteUserChatCompactionThreshold

coderd/database/dbauthz/dbauthz.go:2334–2343  ·  view source on GitHub ↗
(ctx context.Context, arg database.DeleteUserChatCompactionThresholdParams)

Source from the content-addressed store, hash-verified

2332}
2333
2334func (q *querier) DeleteUserChatCompactionThreshold(ctx context.Context, arg database.DeleteUserChatCompactionThresholdParams) error {
2335 u, err := q.db.GetUserByID(ctx, arg.UserID)
2336 if err != nil {
2337 return err
2338 }
2339 if err := q.authorizeContext(ctx, policy.ActionUpdatePersonal, u); err != nil {
2340 return err
2341 }
2342 return q.db.DeleteUserChatCompactionThreshold(ctx, arg)
2343}
2344
2345func (q *querier) DeleteUserSecretByUserIDAndName(ctx context.Context, arg database.DeleteUserSecretByUserIDAndNameParams) (database.UserSecret, error) {
2346 obj := rbac.ResourceUserSecret.WithOwner(arg.UserID.String())

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65

Tested by

no test coverage detected