Add backend for tips and enable markdown support

This commit is contained in:
Sebastian Serth
2020-10-08 19:04:10 +02:00
parent dce5998a2a
commit e550828c58
16 changed files with 171 additions and 10 deletions

View File

@ -0,0 +1,13 @@
class TipPolicy < AdminOnlyPolicy
class Scope < Scope
def resolve
if @user.admin? || @user.teacher?
@scope.all
else
@scope.none
end
end
end
end