Skip to content

Countdown time not exposed properly #3621

@Not-Baguette

Description

@Not-Baguette

Description of the problem

API_READER role is required to see the countdown due to the countdown not being exposed properly. The API is exposable through /contest/team.html

Your environment

  • Domjudge 9.0.0
  • Ubuntu
  • nginx

Steps to reproduce

  1. Initialize Domjudge
  2. Set up a contest
  3. Make a frontend that does not use domjudge's propetiary web
  4. Call /contest/{cid} during activation time before starting time

Expected behaviour

Time should be given like so

{"formal_name":XXXX","scoreboard_type":"scoring","start_time":"2026-04-30T11:00:00+00:00","end_time":"2026-04-30T13:30:00+00:00","scoreboard_thaw_time":"2026-05-01T11:00:00+00:00","duration":"2:30:00.000","scoreboard_freeze_duration":"1:00:00.000","cid":4,"id":"dj-4","name":"UMNPC Internal Contest 2026","shortname":"IC26","allow_submit":true,"runtime_as_score_tiebreaker":true,"warning_message":null,"penalty_time":20}

Actual behaviour

404

Any other information that you want to share?

I'm pretty sure it is caused by abstractapicontroller.php on line 49 if condition checking if the user has API_READER role. Might push a fix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions