Remove intervention controller, route and policy

This commit is contained in:
Sebastian Serth
2018-12-19 01:29:42 +01:00
parent c0608b6f50
commit 0e8c663039
6 changed files with 0 additions and 117 deletions

View File

@@ -1,29 +0,0 @@
class InterventionPolicy < AdminOrAuthorPolicy
def batch_update?
admin?
end
def show?
admin? || teacher?
end
[:clone?, :destroy?, :edit?, :update?].each do |action|
define_method(action) { admin? || author?}
end
def reload?
everyone
end
class Scope < Scope
def resolve
if @user.admin?
@scope.all
elsif @user.teacher?
@scope.where('user_id = ? OR public = TRUE', @user.id)
else
@scope.none
end
end
end
end