Files
codeocean/app/policies/tip_policy.rb
2020-10-14 14:34:26 +02:00

14 lines
192 B
Ruby

class TipPolicy < AdminOnlyPolicy
class Scope < Scope
def resolve
if @user.admin? || @user.teacher?
@scope.all
else
@scope.none
end
end
end
end