Further check for programming group and add custom logging

Fixes CODEOCEAN-V2
This commit is contained in:
Sebastian Serth
2023-09-22 16:48:43 +02:00
parent 40aa50f772
commit 47dd4cf4f7
2 changed files with 3 additions and 1 deletions

View File

@ -11,7 +11,7 @@ class ProgrammingGroupPolicy < ApplicationPolicy
def stream_sync_editor?
# A programming group needs to exist for the user to be able to stream the synchronized editor.
return false unless @record
return false if @record.blank?
admin? || author_in_programming_group?
end