Skip to content

Commit

Permalink
Reallow sandbox on submission and feedback page
Browse files Browse the repository at this point in the history
  • Loading branch information
jorg-vr committed Feb 9, 2024
1 parent 61380e6 commit 7becf18
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/controllers/feedbacks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ class FeedbacksController < ApplicationController

has_scope :by_status, as: 'status'

content_security_policy only: %i[show] do |policy|
# allow sandboxed description
policy.frame_src -> { [sandbox_url] }
end

def show
@crumbs = [
[@feedback.evaluation.series.course.name, course_url(@feedback.evaluation.series.course)],
Expand Down
5 changes: 5 additions & 0 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ class SubmissionsController < ApplicationController

order_by :user, :exercise, :created_at, :status

content_security_policy only: %i[show] do |policy|
# allow sandboxed description
policy.frame_src -> { [sandbox_url] }
end

def index
authorize Submission
@submissions = @submissions.includes(:annotations).paginate(page: parse_pagination_param(params[:page]))
Expand Down

0 comments on commit 7becf18

Please sign in to comment.