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

Method UpdateUserProfile

coderd/database/dbauthz/dbauthz.go:7527–7536  ·  view source on GitHub ↗
(ctx context.Context, arg database.UpdateUserProfileParams)

Source from the content-addressed store, hash-verified

7525}
7526
7527func (q *querier) UpdateUserProfile(ctx context.Context, arg database.UpdateUserProfileParams) (database.User, error) {
7528 u, err := q.db.GetUserByID(ctx, arg.ID)
7529 if err != nil {
7530 return database.User{}, err
7531 }
7532 if err := q.authorizeContext(ctx, policy.ActionUpdatePersonal, u); err != nil {
7533 return database.User{}, err
7534 }
7535 return q.db.UpdateUserProfile(ctx, arg)
7536}
7537
7538func (q *querier) UpdateUserQuietHoursSchedule(ctx context.Context, arg database.UpdateUserQuietHoursScheduleParams) (database.User, error) {
7539 u, err := q.db.GetUserByID(ctx, arg.ID)

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
GetUserByIDMethod · 0.65
UpdateUserProfileMethod · 0.65

Tested by

no test coverage detected