fix(nav): show the player game-data groups to staff #24

Merged
whitlocktech merged 1 commits from fix/staff-player-menu into main 2026-07-22 08:32:59 +00:00
Member

Problem

A signed-in staff account (admin/editor/moderator) with linked game characters saw neither the "My characters/vendors/houses" menu items nor its personal notification options (the personal streams were greyed as "no linked account"), because MenuAccess.PLAYER gated on role == player and the backend 403'd staff off /player/shard/*.

Fix

  • Menu.kt: gate MenuAccess.PLAYER on isPlayer or isStaff (staff are a superset of players).
  • The notifications screen needs no change: once the backend returns the caller's linked accounts (paired with RunicGateway/website#94), hasLinkedAccount resolves and the personal streams enable themselves.
  • MenuAccessTest updated: every staff role now sees the player game-data groups; an unrecognized role / anon still cannot.

Tests: full testDebugUnitTest suite passes.

Coordinated change (must merge together)

  • backend: RunicGateway/website#94 — opens /player/* to any authenticated account. This app change depends on it (the menu appears, but the screens 403 without the backend fix).
  • docs: RunicGateway/docs#36

🤖 Generated with Claude Code

AI-assisted: authored with Claude Code (Opus 4.8).

## Problem A signed-in staff account (admin/editor/moderator) with linked game characters saw neither the "My characters/vendors/houses" menu items nor its personal notification options (the personal streams were greyed as "no linked account"), because `MenuAccess.PLAYER` gated on `role == player` and the backend 403'd staff off `/player/shard/*`. ## Fix - `Menu.kt`: gate `MenuAccess.PLAYER` on `isPlayer` **or** `isStaff` (staff are a superset of players). - The notifications screen needs no change: once the backend returns the caller's linked accounts (paired with `RunicGateway/website#94`), `hasLinkedAccount` resolves and the personal streams enable themselves. - `MenuAccessTest` updated: every staff role now sees the player game-data groups; an unrecognized role / anon still cannot. **Tests:** full `testDebugUnitTest` suite passes. ## Coordinated change (must merge together) - backend: `RunicGateway/website#94` — opens `/player/*` to any authenticated account. **This app change depends on it** (the menu appears, but the screens 403 without the backend fix). - docs: `RunicGateway/docs#36` 🤖 Generated with [Claude Code](https://claude.com/claude-code) AI-assisted: authored with Claude Code (Opus 4.8).
wtclaude added 1 commit 2026-07-22 08:26:44 +00:00
fix(nav): show the player game-data groups to staff
All checks were successful
PR Checks / android-build (pull_request) Successful in 6m8s
3aeb295342
Staff are a superset of players (all player abilities plus their staff
tools), and the backend's player self-service surface is role-agnostic,
but MenuAccess.PLAYER gated "My characters/vendors/houses" on
role == player — so a signed-in admin/editor/moderator saw neither the
menu items nor, via the greyed personal streams, their own notification
options, even with linked characters.

Gate MenuAccess.PLAYER on isPlayer OR isStaff. The notifications screen
needs no change: once the backend returns the caller's linked accounts
(paired with RunicGateway/website), hasLinkedAccount resolves and the
personal streams enable themselves.

Tests: MenuAccessTest now asserts every staff role sees the player
game-data groups and a PLAYER entry, and an unrecognized role / anon
still cannot. Full unit suite passes.

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech approved these changes 2026-07-22 08:29:18 +00:00
whitlocktech scheduled this pull request to auto merge when all checks succeed 2026-07-22 08:29:23 +00:00
whitlocktech merged commit f0a3b6c03e into main 2026-07-22 08:32:59 +00:00
whitlocktech deleted branch fix/staff-player-menu 2026-07-22 08:33:00 +00:00
Sign in to join this conversation.
No description provided.