Skip to content

Commit

Permalink
Merge pull request #59 from hso-praktomat/fix-user-solution-download
Browse files Browse the repository at this point in the history
Fix solution download for users
  • Loading branch information
skogsbaer authored Jun 22, 2024
2 parents 2f45bb8 + f28d309 commit 2a873e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solutions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def solution_download(request, solution_id, include_checker_files, include_artif
solution = get_object_or_404(Solution, pk=solution_id)
allowed_tutor = request.user.is_tutor and solution.author.tutorial in request.user.tutored_tutorials.all()
allowed_user = solution.author == request.user and not include_checker_files and not include_artifacts
hide = request.user.is_user and solution.task.should_hid(request.user)
hide = request.user.is_user and solution.task.should_hide(request.user)
if not (request.user.is_superuser or request.user.is_trainer or allowed_tutor or allowed_user) or hide:
return access_denied(request)

Expand Down

0 comments on commit 2a873e4

Please sign in to comment.