Player profile pictures: privacy decision and Spaces storage
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reading ADR 0009, docs/privacy/personal-data-inventory.md, and the settings helpers in config/settings.py; the issue says privacy decisions must be recorded before code stores pictures. Then map the storage, API, test overrides, and deployment changes named in the tasks. Done means the privacy policy, private Space storage, safe image processing, endpoints, deletion behavior, and tests meet the listed acceptance criteria.
Written by the indexing model from the issue text.
Description
Context: Players should be able to upload a profile picture when they create or edit their profile (#124). Nothing stores one today. A photo of a face is identifying personal data, and ADR 0009 does not list it, so it needs a privacy decision before any code. Storage is also missing: STORAGES["default"] is FileSystemStorage, and on App Platform each component's disk is wiped on every deploy and is not shared between web and worker (#61). Pictures need object storage, a DigitalOcean Space.
Tasks:
- Amend ADR 0009 (or add an ADR) for profile pictures. Decide and record:
- Who sees a picture: the public profile, signed-in players, Partners, or the player only. How it follows the Player's privacy settings and opt-out
- Whether players aged 13 to 17 may upload one, and what others see for them. They are already left out of all partner sharing
- Whether a picture is ever returned to Partners (partner API, webhooks, Log in with OPEN)
- Content moderation: who reviews images, how a picture is reported and removed, and whether review happens before it is shown
- Retention: replacing a picture deletes the old file; account deletion (#116) deletes every stored copy
- Add the picture to
docs/privacy/personal-data-inventory.mdand to the list of identifying personal data fields, so an Audit Event records only that it changed - Add
django-storageswith the S3 backend for DigitalOcean Spaces. Read the bucket, region, endpoint, and keys from the environment with theconfig/settings.pyhelpers; placeholders only in.env.example - Private bucket. Serve pictures through short-lived signed URLs or an app endpoint, never public object URLs that outlive a removal or a privacy change
- Keep local development and tests working without a Space (local storage in compose, in-memory storage in the test overrides, with
config/settings_test.pyandconfig/test_runner.pykept identical) - Upload processing:
- Accept JPEG, PNG, and WebP only, checked by decoding the image, not by extension or content type
- Limit file size and pixel dimensions, and refuse decompression bombs
- Re-encode the image and strip all metadata (EXIF, including GPS location)
- Resize to a fixed set of sizes
- Store under a random key that holds no Player id, OPEN Code, or name
- Endpoints under
/api/v1/me/playerto upload, replace, and remove the picture, with explicitoperation_ids. Return the picture URL in the profile responses where the ADR allows it - Only the player sets their own picture. Staff and moderators may only remove it, with an Audit Event
- Add the Space and its credentials to the app spec (#61) and the staging and production environments (#63, #68)
- Tests
Acceptance criteria:
- The ADR and the personal data inventory list the picture before any code that stores one is merged
- An uploaded image is stored with no EXIF or other metadata
- A non-image file, an image over the size or dimension limit, or a decompression bomb returns 422 without echoing the file name or contents
- A removed or replaced picture is deleted from storage, and an old URL stops working
- A picture is never visible where the Player's privacy settings or opt-out hide the profile, and never reaches a Partner unless the ADR allows it
- No stored key or URL contains a row id, OPEN Code, or name
- The test suite and local development run without a Space or its credentials
Out of scope:
- The upload and crop screens (frontend repository)
- CSV upload storage. #71 can keep files in Postgres and does not need a Space
Depends on: #124, #61
Size: L
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 7m
- Merged PRs (30d)
- 206
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openpickleball/backend
-
area:infra documentation priority:p2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#472 ·
Maintainers usually reply within 1 day
-
Show doctl's error when the Deploy workflow's update failsPossibly taken @GeoBradDev claimed this today. Openarea:infra bug priority:p2 size:S
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#471 ·
Maintainers usually reply within 1 day
-
area:infra documentation type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
openpickleball/backend#196 ·
Maintainers usually reply within 1 day
-
area:infra type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
openpickleball/backend#195 ·
Maintainers usually reply within 1 day
-
area:api enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
openpickleball/backend#470 ·
Maintainers usually reply within 1 day
All issues in openpickleball/backend
Similar issues
-
[Resource]: SpaicelyOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 68/100
hesreallyhim/awesome-claude-code#3875 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bvis/aegis-hass#725 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.xPossibly taken @NimaVaziri claimed this today. OpenPytorch
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/TensorRT-LLM#23406 ·
Maintainers usually reply within 1 day