Skip to content

Commit

Permalink
add missing not to permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
tykling committed Nov 19, 2024
1 parent b040c54 commit 95d0662
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jobs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def assign_file_jobs(
request: HttpRequest, client: JobClientSchema, filters: JobFilters = query, *, check: bool = False
) -> JobApiResponseType:
"""Assign jobs for a file to the calling user."""
if request.user.is_worker: # type: ignore[union-attr]
if not request.user.is_worker: # type: ignore[union-attr]
return 403, {"message": "No worker permission."}

# clear old assigned unfinished jobs here
Expand Down

0 comments on commit 95d0662

Please sign in to comment.