Improve CodeOcean::FilePolicy with specs

This commit is contained in:
Sebastian Serth
2020-12-07 14:41:30 +01:00
parent fac29f73d4
commit f5492ca35d
3 changed files with 27 additions and 5 deletions

View File

@ -14,7 +14,7 @@ module CodeOcean
def create?
if @record.context.is_a?(Exercise)
admin? # FIXME: || author?
admin? || author?
elsif @record.context.is_a?(Submission) and @record.context.exercise.allow_file_creation
author?
else