Add support for signed URLs used by the render_file function

This commit is contained in:
Sebastian Serth
2022-09-23 11:26:56 +02:00
parent 5881795d5f
commit 16c00ec136
16 changed files with 229 additions and 31 deletions

View File

@@ -6,11 +6,15 @@ class SubmissionPolicy < ApplicationPolicy
end
# insights? is used in the flowr_controller.rb as we use it to authorize the user for a submission
%i[download? download_file? render_file? run? score? show? statistics? stop? test?
%i[download? download_file? run? score? show? statistics? stop? test?
insights?].each do |action|
define_method(action) { admin? || author? }
end
def render_file?
everyone
end
def index?
admin?
end