Skip to content

Commit

Permalink
Actually access is already checked in the get method
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Jul 25, 2024
1 parent 23dfd9a commit 7c3f33f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/wps/core/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,22 +278,6 @@ async def work_order_token(
log.error(access_error, extra=extra)
raise access_error

if work_package.type == WorkType.DOWNLOAD:
# since the work package access token is long-lived,
# we double-check that the user still has access
if not await self._access.check_download_access(
work_package.user_id, work_package.dataset_id
):
access_error = self.WorkPackageAccessError(
"Dataset access permission has been revoked"
)
log.error(access_error, extra=extra)
raise access_error
else:
access_error = self.WorkPackageAccessError("Unsupported work type")
log.error(access_error, extra=extra)
raise access_error

user_public_crypt4gh_key = work_package.user_public_crypt4gh_key
wot = WorkOrderToken(
type=work_package.type,
Expand Down

0 comments on commit 7c3f33f

Please sign in to comment.