Rename user to contributor in submission
This commit is contained in:

committed by
Sebastian Serth

parent
97138288f4
commit
0234414bae
@ -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.
|
||||
|
Reference in New Issue
Block a user