Let players preview their profile as other players see it

Open
#440 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
api, backend

Research direction

Start by locating the existing reads for profiles, ratings, rating history, stats, partner and head-to-head records, and match history; the issue does not name specific files or tests. Trace the backend rules for privacy settings, minors, confirmed matches, and opponent permissions. Done means a signed-in player can obtain a complete preview using the same visibility rules as another player without changing existing responses, with the endpoint shape and audit-log behavior decided.

Written by the indexing model from the issue text.

Description

area:api area:players enhancement

Suggestion

Let a player see their own profile the way another signed-in player sees it, so they can check what their privacy settings show before anyone else looks.

Why the backend

Who sees what is layered, and the backend enforces every rule (frontend hard rule 6):

  • The profile fields (city and region, gender division, age group) each follow their own setting.
  • Stats show other players only singles and doubles overall, never mixed, men's or women's doubles. The average partner and opponent ratings also need the match history setting.
  • A partner record needs both the stats and match history settings.
  • Rating history links to a match show only for a confirmed singles match, and only when the opponent's settings allow it too.
  • Players aged 13 to 17 follow their own rules.

If the app copied these rules to build a preview, it could drift from the backend and tell a player something false. A preview served by the backend uses the same code that serves other players.

Possible shape

A way for the signed-in player to read their own profile, ratings, rating history, stats, partner and head-to-head records and match history as another signed-in player would. For example, a view_as=signed_in option on the existing reads, allowed only for the player's own code. It never changes what anyone else can see.

Questions to decide

  1. One option on each existing read, or one preview endpoint that returns the whole profile?
  2. What does the preview of a head-to-head record show, since it depends on who is looking?
  3. Should a preview be recorded in the audit log?

Frontend follow-up

A "Preview your profile" link on Profile > Privacy that opens the player's own profile page in preview mode. To be filed in openpickleball/frontend once this is decided.

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.