Use author_in_programming_group? policy for files & RfCs

* Allow all members of a programming group to list and solve RfCs
* Also adjust policy specs to respect programming groups
This commit is contained in:
kiragrammel
2023-08-22 09:23:20 +02:00
committed by Sebastian Serth
parent 9d1be1eeff
commit 01accdae58
7 changed files with 101 additions and 19 deletions

View File

@@ -38,7 +38,7 @@ module CodeOcean
if @record.context.is_a?(Exercise)
admin? || author?
elsif @record.context.is_a?(Submission) && @record.context.exercise.allow_file_creation
author?
author? || author_in_programming_group?
else
no_one
end