feat: allow password changes through PUT /api/v1/admin/users/{id} - #102
Open
aaronbrethorst wants to merge 8 commits into
Open
feat: allow password changes through PUT /api/v1/admin/users/{id}#102aaronbrethorst wants to merge 8 commits into
aaronbrethorst wants to merge 8 commits into
Conversation
…oyment guide fixes
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
3 tasks
docs: production deployment guide and operator manual; fix the Docker build
diveshpatil9104
added a commit
to diveshpatil9104/vehicle-positions
that referenced
this pull request
Sep 8, 2026
The guard read one hardcoded path, docs/configuration.md, so it only worked while the reference lived in the file this branch adds. That couples a test about whether a variable is documented to a question it should not care about: which file documents it. OneBusAway#102 adds a configuration reference inside docs/deployment.md covering the same 27 variables. Whichever of the two files ends up canonical, every variable the server reads should still have to appear in one of them, and a hardcoded path would fail for the wrong reason the moment that choice changes. documentedVariables now scans README.md and docs/*.md, skipping docs/superpowers -- those are design specs and implementation plans, so a variable named in a table there is not documented for the person deploying this. It returns the file each variable was found in, so a stale-row failure names the file to edit rather than a path the reader has to go looking for. Verified both directions: moving the table to docs/deployment.md keeps the suite green, and removing it entirely turns it red.
diveshpatil9104
added a commit
to diveshpatil9104/vehicle-positions
that referenced
this pull request
Sep 8, 2026
Scan README.md and docs/*.md instead of one hardcoded path, so the guard holds whether the table stays here or moves into OneBusAway#102's docs/deployment.md.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third PR in the stack. The admin web UI's edit-user form can already reset a password, but the JSON API could not, and
user_store.gocarried a stale TODO saying a separate endpoint was needed. This bringsPUT /api/v1/admin/users/{id}to parity with the UI:passwordis an optional field on the update body. Blank (or absent) keeps the current password.400 password must be at least 8 charactersand neither the profile nor the hash is touched.UpdateUserPasswordstore method. The password never appears in the response.Additive: existing clients sending only
name/email/roleare unaffected; unknown fields are still rejected.Test plan
go vet ./... && go test ./...TestHandleUpdateUser_PasswordOptional: blank leaves the hash alone; new password applied after the profile update and not echoed; short password rejected before any writeTestHandleUpdateUser_UnknownFieldRejectedupdated to use a genuinely unknown field (it previously usedpasswordas its example)