diff --git a/dispatcher/backend/src/routes/workers/worker.py b/dispatcher/backend/src/routes/workers/worker.py index 0ae23183..fef92aae 100644 --- a/dispatcher/backend/src/routes/workers/worker.py +++ b/dispatcher/backend/src/routes/workers/worker.py @@ -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: @@ -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,