Skip to content

chore: add "user_configs" db table #16564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Mar 5, 2025
Merged
Prev Previous commit
Next Next commit
fixies
  • Loading branch information
aslilac committed Feb 14, 2025
commit 929d70b93c1d1c4696a04a4d649f42626f47d06e
4 changes: 2 additions & 2 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion coderd/database/dbauthz/dbauthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -2425,7 +2425,11 @@ func (q *querier) GetUserActivityInsights(ctx context.Context, arg database.GetU
}

func (q *querier) GetUserAppearanceSettings(ctx context.Context, userID uuid.UUID) (string, error) {
if err := q.authorizeContext(ctx, policy.ActionReadPersonal, rbac.ResourceUser); err != nil {
u, err := q.db.GetUserByID(ctx, userID)
if err != nil {
return "", err
}
if err := q.authorizeContext(ctx, policy.ActionReadPersonal, u); err != nil {
return "", err
}
return q.db.GetUserAppearanceSettings(ctx, userID)
Expand Down
6 changes: 3 additions & 3 deletions coderd/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,8 @@ func (api *API) notifyUserStatusChanged(ctx context.Context, actingUserName stri
return nil
}

// @Summary Update user appearance settings
// @ID update-user-appearance-settings
// @Summary Get user appearance settings
// @ID get-user-appearance-settings
// @Security CoderSessionToken
// @Accept json
// @Produce json
Expand Down Expand Up @@ -1003,7 +1003,7 @@ func (api *API) userAppearanceSettings(rw http.ResponseWriter, r *http.Request)
}

// @Summary Update user appearance settings
// @ID update-user-appearance-settings
// @ID update-user-appearance-setting
// @Security CoderSessionToken
// @Accept json
// @Produce json
Expand Down
37 changes: 37 additions & 0 deletions docs/reference/api/users.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading