Skip to content

Commit

Permalink
Skip vtjson validation for withelisted users
Browse files Browse the repository at this point in the history
  • Loading branch information
ppigazzini committed May 4, 2024
1 parent 2737c82 commit ca31f38
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions server/fishtest/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,16 @@ def validate_request(self, api):
self.validate_username_password(api)

# Is the request syntactically correct?
try:
validate_request(self.request_body)
except ValidationError as e:
self.handle_error(str(e))
whitelisted_users = (
"user00",
"vdv",
)
username = self.request_body["worker_info"]["username"]
if username not in whitelisted_users:
try:
validate_request(self.request_body)
except ValidationError as e:
self.handle_error(str(e))

# is a supplied run_id correct?
if "run_id" in self.request_body:
Expand Down

0 comments on commit ca31f38

Please sign in to comment.