i_1269 fix scoreboard endpoint to comply with the intent of the Information Access Policy#1270
Open
johnbrvc wants to merge 1 commit into
Open
i_1269 fix scoreboard endpoint to comply with the intent of the Information Access Policy#1270johnbrvc wants to merge 1 commit into
johnbrvc wants to merge 1 commit into
Conversation
Create a new chained constructor that accepts an additional boolean argument which indicates of the freeze should be obeyed when generating the scoreboard for the endpoint. The original constructor chains to the new one and supplies false. The original constructor is now only used when generating reports and results files, so we always want unfrozen scoreboards for that. Update the ScoreboardService to pass a boolean indicating if a frozen scoreboard is desired (basically, if the role of the requestor is not administrator and not judge).
kkarakas
approved these changes
Apr 30, 2026
Collaborator
kkarakas
left a comment
There was a problem hiding this comment.
I only looked at the code, should work LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of what the PR does
Create a new chained constructor that accepts an additional
booleanargument which indicates if the freeze should be obeyed when generating the scoreboard for the endpoint. The original constructor chains to the new one and suppliesfalse. The original constructor is now only used when generating reports and results files, so we always want unfrozen scoreboards for that.Update the
ScoreboardServiceto pass abooleanindicating if a frozen scoreboard is desired (basically, if the role of the requestor is not administrator and not judge).Issue which the PR addresses
Fixes #1269
Environment in which the PR was developed (OS,IDE, Java version, etc.)
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)
Precise steps for testing the PR (i.e., how to demonstrate that it works correctly)
These steps are more or less lifted from the issue:
wf46prefinalizefolder so you'll have to copy theprofilesandprofiles.properties into yourpc2v9folder.After loading the contest, close the server and reopen it. This has to be done because there were some runs in a funny state that had to be cleaned up with the first load. There's bug in PC2 where, when this happens, the Runs table does not get populated. Reloading fixes that issue.
public_htmlfolder produced by the pc2board.index.html" file and notice the top teams. This is a frozen scoreboard. Massachusetts Institute of Technology (team 46054) is in first place and National Research University Higher School of Economics (team 46061) is in second place.