feat(profile): add mokosh-side Profile page, rename hub link to Account Settings #80

Merged
YousifShkara merged 1 commit from feat/mokosh-profile-page into main 2026-06-06 03:07:16 +02:00
Owner

The UserMenu previously had a single "Profile" entry pointing at bunyip-web's /settings. That conflated two distinct surfaces:

  • Mokosh profile: tenant-scoped fields on the user row in mokosh-server's users table (first / last name, title, phone, mobile, timezone). These describe the user inside a specific PSA tenant and have no analog on the Bunyip side.
  • Bunyip account settings: cross-app identity (email, password, MFA, sessions, billing). These apply to every PSA app the user signs into via Bunyip.

The menu now exposes both:

  • "Profile" -> new /profile SPA route, served by pages::profile::ProfilePage. Reads GET /api/v1/auth/me, writes PUT /api/v1/auth/me with the editable fields only (server-side update_current_user already strips role/status from UpdateUserRequest, so the form does not need to). Internal route, uses Link so the SPA transitions without a full reload.
  • "Account Settings" -> bunyip-web's /settings (renamed from the old "Profile"). External origin, uses <a> so the browser actually navigates.

The Profile page itself opens with a read-only identity strip (email + role + a link back to Account Settings on the Bunyip hub) so users understand which fields live where; the editable form below covers the six tenant-scoped fields.

No mokosh-server changes: the /api/v1/auth/me GET + PUT endpoints already exist and already gate role / status updates. No bunyip-side changes either; the existing /settings page picks up the new link unmodified.

The UserMenu previously had a single "Profile" entry pointing at bunyip-web's `/settings`. That conflated two distinct surfaces: - Mokosh profile: tenant-scoped fields on the user row in mokosh-server's `users` table (first / last name, title, phone, mobile, timezone). These describe the user inside a specific PSA tenant and have no analog on the Bunyip side. - Bunyip account settings: cross-app identity (email, password, MFA, sessions, billing). These apply to every PSA app the user signs into via Bunyip. The menu now exposes both: - "Profile" -> new `/profile` SPA route, served by `pages::profile::ProfilePage`. Reads `GET /api/v1/auth/me`, writes `PUT /api/v1/auth/me` with the editable fields only (server-side `update_current_user` already strips role/status from `UpdateUserRequest`, so the form does not need to). Internal route, uses `Link` so the SPA transitions without a full reload. - "Account Settings" -> bunyip-web's `/settings` (renamed from the old "Profile"). External origin, uses `<a>` so the browser actually navigates. The Profile page itself opens with a read-only identity strip (email + role + a link back to Account Settings on the Bunyip hub) so users understand which fields live where; the editable form below covers the six tenant-scoped fields. No mokosh-server changes: the `/api/v1/auth/me` GET + PUT endpoints already exist and already gate role / status updates. No bunyip-side changes either; the existing `/settings` page picks up the new link unmodified.
feat(profile): add mokosh-side Profile page, rename hub link to Account Settings
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 45s
18e2f772d7
The UserMenu previously had a single "Profile" entry pointing at bunyip-web's `/settings`. That conflated two distinct surfaces:

- Mokosh profile: tenant-scoped fields on the user row in mokosh-server's `users` table (first / last name, title, phone, mobile, timezone). These describe the user inside a specific PSA tenant and have no analog on the Bunyip side.
- Bunyip account settings: cross-app identity (email, password, MFA, sessions, billing). These apply to every PSA app the user signs into via Bunyip.

The menu now exposes both:

- "Profile" -> new `/profile` SPA route, served by `pages::profile::ProfilePage`. Reads `GET /api/v1/auth/me`, writes `PUT /api/v1/auth/me` with the editable fields only (server-side `update_current_user` already strips role/status from `UpdateUserRequest`, so the form does not need to). Internal route, uses `Link` so the SPA transitions without a full reload.
- "Account Settings" -> bunyip-web's `/settings` (renamed from the old "Profile"). External origin, uses `<a>` so the browser actually navigates.

The Profile page itself opens with a read-only identity strip (email + role + a link back to Account Settings on the Bunyip hub) so users understand which fields live where; the editable form below covers the six tenant-scoped fields.

No mokosh-server changes: the `/api/v1/auth/me` GET + PUT endpoints already exist and already gate role / status updates. No bunyip-side changes either; the existing `/settings` page picks up the new link unmodified.
YousifShkara deleted branch feat/mokosh-profile-page 2026-06-06 03:07:16 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!80
No description provided.