Add comment about #insights? in SubmissionPolicy

This commit is contained in:
Sebastian Serth
2018-11-28 15:55:44 +01:00
parent 832b48ba62
commit 08ce579e8d

View File

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