Repository navigation
Tasks API - let competition organizers update a task used by their competition - #2670
Merged
Merged
Conversation
6 tasks done
…mpetition Only the task creator (or a superuser) could edit a task. A co-organizer who needs to fix the scoring program or a dataset therefore has to upload a new task and replace the old one in the phase, which detaches every existing score (shown as n/a) and leads to deleting the old task. Allow users the task is shared with and organizers of a competition that uses the task to update it in place. Deleting stays creator-only.
Didayolo
force-pushed
the
task-update-collaborators
branch
from
October 21, 2026 02:28
a74e8e1 to
3e35173
Compare
Member
Author
|
I fixed some points, and importantly I changed the rule that gives permission to edit a task: Now you can edit a task only if you are co-organizer of a competition that was created by the task creator. Otherwise an attacker can find ways to edit public tasks, or even private tasks by adding anyone as a co-organizer of their own competition. |
Member
Author
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.

Original PR #2649
Description
Follows @Didayolo's comment on #2624: the common reason a phase task gets replaced is that a co-organizer cannot edit a task created by the challenge owner. Replacing detaches every existing score (
n/aon the leaderboard) and usually ends with the old task being deleted.TaskViewSet.updateonly allowed the creator or a superuser. This PR also allows:shared_withso the task can be fixed in place: same task id, existing scores stay comparable, re-run keeps working. Deletion stays creator-only (it is irreversible; see #2648).
Together with #2642 (flag outdated scores), #2644 (resubmit on current tasks) and #2648 (refuse to delete a task with submissions), this removes the need to change re-run semantics as in #2624.
Issues this PR resolves
A checklist for hand testing
Checklist