Organizer flag feed: show anomaly flags to organizers

Open
#213 3 comments 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
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start by reading #40 and #125, since this operation builds on the existing admin flag view and its dependencies. Identify how flags are currently stored and queried, then map the auth=account_auth operation path for verified Organizers and the settings-driven window for player flags. The work is done when the listed tests cover Organizer scope, refusal for unverified Organizers, privacy-safe item fields, and read-only behavior, and when the schema, docs and ADR state that a flag is a signal rather than a finding.

Written by the indexing model from the issue text.

Description

area:api area:security enhancement priority:p2 size:M

Context: OPEN detects suspicious patterns automatically and flags them, but never applies an automatic penalty (#206, #207, #175, #51, #123, #209). False positives are certain, and a penalty needs an appeals process OPEN does not have yet. Under ADR 0034, Organizers are the audience for these flags, not moderators: they decide who plays in which division, and they can act on a flag at their own Events. OPEN provides the data; the organizer decides.

Tasks:

  • An operation, with auth=account_auth, for members of a verified Organizer that lists the open flags relevant to that Organizer:
    • match flags on Matches in its Events or its Clubs
    • player flags (#175, #51, #123, #209) for Players who played a counted Match in one of its Events within a window from settings
  • Each item has the flag's reason, the rule that fired, when it was raised, and the OPEN Codes of the Match or Player. Player flags computed from a Replay also carry its as-of date and config fingerprint. Never a row id
  • Privacy: never reveal another player's identity or claim (a #123 flag says only that the player's external ID is under review), and leave out Players whose Account is inactive. Decide and record how players aged 13 to 17 appear
  • The schema and docs say that a flag is a signal, not a finding: it carries no penalty and the player has not been judged
  • An ADR recording which flags organizers see and why
  • Tests, including an Organizer that cannot see a flag on another Organizer's Event or player

Acceptance criteria:

  • A member of a verified Organizer sees flags for its own Events, Clubs, and their players, and nothing else
  • A member of an unverified Organizer, and any other Account, is refused
  • No item exposes another player's identity or a row id
  • Reading flags changes nothing: no Rating, Match, or Player state

Depends on: #125

Related: #206, #207, #175, #51, #123, #209

Size: M

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.