Stop collecting a name and work phone the server discards (MAPPS-431) #509
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-431-profile-identity-fields"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
MAPPS-431. SPA only, no server change.
Three fields, not one
The profile page sent
first_name,last_name,phone,mobile,title,timezoneanddate_format_string. mokosh-server'sUpdateUserRequestacceptsemail,mobile,title,role,status,timezone,date_format_string, the theme pair andlogin_location_alerts.The first three are absent from the second, deliberately: PMS-512 removed them because bunyip owns identity and mokosh keeps a read-only cache, refreshed by
upsert_user_from_oidcon every login. So the PUT succeeded, three keys reached no column, and the screen said "Saved". The typed values then sat there looking saved until the next reload put the old ones back.The page already knew
IdentityStrip, at the top of the same screen, reads "Name, email, password, 2FA, sessions, and billing are owned by Bunyip. Change them there", with a link to Account Settings.The card immediately below offered to edit the name anyway. The page contradicted itself inside one screen, and the half that was wrong was the half with the input boxes and the Save button. That is also why removing the inputs loses nothing: the name is already shown at the top and already linked to where it can be changed.
Work phone, for a related reason
Bunyip owns
phone(BUNYIP-139) and flows it asphone_numberunder thephonescope (BUNYIP-140). This SPA requestsopenid email offline_access profile, so that claim never arrives andusers.phoneis a cache of something nobody sends.mobileis different: mokosh's own column, accepted, and it saves. A dead "Work phone" directly above a live "Mobile" was the most confusing possible arrangement of those two facts, so the survivor's help text now says which one this page owns.Why not the other two options
Writing identity to bunyip is still blocked: the SPA's token is minted for mokosh's audience and bunyip's Resource Server refuses it (MAPPS-427, BUNYIP-252). It needs an audience change and a bunyip endpoint before it is even possible.
Re-opening a local write path reverses PMS-512 for no gain, because bunyip overwrites the names on the very next login. The value would survive until the user signs in again.
Testing
cargo fmt --all --check,cargo clippy --all-targets -- -D warnings, both guard scripts,cargo test --lib(292 passing, up from 291).The new test is a recurrence guard scanning this module's own source: nothing may be added to the request body that
UpdateUserRequestdoes not accept, andmobilemust stay, since the distinction between the two is the entire point. It scans the file minus its own test module, because the assertion names the strings it forbids.