Add Request for Comments view per exercise, adopt policies for teachers
This commit is contained in:
@ -3,11 +3,11 @@ class ExercisePolicy < AdminOrAuthorPolicy
|
||||
admin?
|
||||
end
|
||||
|
||||
[:show?, :study_group_dashboard?].each do |action|
|
||||
[:show?, :study_group_dashboard?, :feedback?, :requests_for_comments?].each do |action|
|
||||
define_method(action) { admin? || teacher? }
|
||||
end
|
||||
|
||||
[:clone?, :destroy?, :edit?, :statistics?, :update?, :feedback?].each do |action|
|
||||
[:clone?, :destroy?, :edit?, :statistics?, :update?].each do |action|
|
||||
define_method(action) { admin? || author? }
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user