Skip to content

Commit

Permalink
Remove TODO from code base
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Sep 22, 2023
1 parent 9489ebf commit 95d93c5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions dispatcher/backend/src/routes/workers/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ class WorkerCheckinRoute(BaseRoute):
@authenticate
@dbsession
def put(self, session: so.Session, name: str, *args, **kwargs):
# TODO: is it acceptable that any authenticated user can update the checkin
# status of any worker ? shouldn't we check authenticated user scope + match
# between authenticated user id and worker user id
# see https://github.com/openzim/zimfarm/issues/764
try:
request_json = WorkerCheckInSchema().load(request.get_json())
except ValidationError as e:
Expand All @@ -122,7 +118,7 @@ def put(self, session: so.Session, name: str, *args, **kwargs):
BadRequest,
"worker has been marked as deleted",
)
# TODO: should we refuse to alter the worker user_id ?
# should we refuse to alter the worker user_id ?
# raise_if(
# worker.user_id != user.id,
# BadRequest,
Expand Down

0 comments on commit 95d93c5

Please sign in to comment.