Rename user to contributor in submission

This commit is contained in:
kiragrammel
2023-08-11 12:15:36 +02:00
committed by Sebastian Serth
parent 97138288f4
commit 0234414bae
39 changed files with 267 additions and 233 deletions

View File

@ -17,7 +17,7 @@ module FileParameters
# avoid that public files from other contexts can be created
# `next` is similar to an early return and will proceed with the next iteration of the loop
next true if file.context_type == 'Exercise' && file.context_id != exercise.id
next true if file.context_type == 'Submission' && (file.context.user_id != current_user.id || file.context.user_type != current_user.class.name)
next true if file.context_type == 'Submission' && (file.context.contributor_id != current_user.id || file.context.contributor_type != current_user.class.name)
next true if file.context_type == 'CommunitySolution' && controller_name != 'community_solutions'
# Optimization: We already queried the ancestor file, let's reuse the object.