Skip to content

feat(mobile-gps): let authenticated non-rescuers view the map showing rescuers only #323

Description

@Adamskiee

Reported during QA session. Future enhancement — not scheduled.

What's wrong

The map is rescuer-only. app/(drawer)/(tabs)/map.tsx gates on useAuth().isRescuer and redirects everyone else away, so an ordinary authenticated user in an emergency has no way to see whether help is nearby or where it is.

What I'd like

An authenticated non-rescuer should be able to open the map and see rescuers only — never other regular users. The rescuer-visible view (all users, including people needing help) stays rescuer-only.

Proposed change

  • Relax the mobile map's isRescuer gate to allow any authenticated user in, with a role-dependent dataset.
  • Enforce the filtering server-side. The endpoint backing the map (server/app/api/gps.py latest-locations / the GPS WS) must return only rescuer positions to a non-rescuer caller. Client-side filtering alone is not acceptable here — it would ship every user's live coordinates to every device and just hide them in the UI.
  • Suppress rescuer-only affordances for non-rescuers (location history/path playback, and anything else that exposes a specific person's movement over time).
  • Reuse the distinct rescuer marker from feat(mobile-gps,admin): distinguish rescuer markers from regular user markers on the map #322 rather than adding a second marker vocabulary.

Open questions

  • Should a non-rescuer see all rescuers, or only rescuers within some radius / assigned to their incident? Broadcasting every responder's live position to every account is a real disclosure decision, not just a filter.
  • Should a non-rescuer's own position be published to rescuers as a side effect of opening the map, and is that consented to anywhere today?
  • Does rescuer presence/availability status need to be exposed too, or position only?

Additional context

This touches who can see whose live location, so it needs a security review before implementation, not after. Depends on #322 (rescuer marker differentiation) landing first to be useful. Related: #324 (admin-published map sites) — same goal of making the map useful to non-rescuers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendenhancementNew feature or requestfuture-enhancementNot scheduled; tracked for later considerationgpsLocation/GPS featuremobilemobile-app Expo/React Nativesecurity-reviewRequires security review before implementation

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions